Skip to Main Content

Programming Languages & Frameworks

JRE Version Check Issue in Deployjava.js script

3481907Jun 7 2017 — edited Jun 7 2017

Hello All,

Issue:

We have multiple versions of Forms (11.1.1.4, 11.1.1.6 & 11.1.2.2) running on different OS (WIN Server 2008 R2 &2012). The jdk is also different according to the oracle support matrix.

In the client side we have Win 7 and IE 11 as browser. We have multiple versions of JRE to support the needs to different versions of our application. The JRE requirement is forced in formsweb.cfg. The browser and supported JREs validation is being checked in baseJpi.html, which calls deployJava.js. we are passingĀ  <required JRE version>+ as parameter in deployJava.versionCheck.

This is working fine so far, but we have encountered a mathematical bug in the deployJava due to the three digit sub version/build number in JRE.

We have latest JRE 1.8.0_121 in our client machine. The application requirement is 1.8.0_45. So the JRE check is done with deployJava.versionCheck("1.8.0_45+"). Ideally it should allow the application with 1.8.0_45 or any higher JRE.

But deployJava is considering 1.8.0_121 is lower than 1.8.0_45. As deployJava returns the check as "false", baseJpi.html is blocking application access (which is our customized script to not to allow user when desired JRE is not present)

Solution:

we analyzed that during the check, deployJava is considering the JRE version as string and then it is comparing with the existing version, hence we tried to changing the code to compare the JRE version as Number, it worked.

The following line is the change in the code of deployJava.js script.

compareVersionToPattern:function(version,patternArray,failyMatch) {var regex="^(\\d+) (?:\\.(\\d+) (?:\\.(\\d+)(?:_(\\d+))?)?)?$";var matchData=version.match(regex);if(matchData!=null) {var index=0; var result=new Array() ; for(var I=1;i<matchData.length;++i) {if((typeof matchData[I]=='string') && (matchData[i]!=' ')) { result[index]=Number(matchData[I]);index++;}}

Now the question is, with the above change can we foresee any other impact ?

Regards,
Swathi Bharadwaj

Comments
Post Details
Added on Jun 7 2017
0 comments
1,330 views