JDK-7160385 : REGRESSION: Jre DeployJava issue with Jre 1.7.0
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Priority: P2
  • Affected Version: 7u4
  • OS: windows_xp
  • CPU: x86
  • Submit Date: 2012-04-10
  • Updated Date: 2013-09-12
  • Resolved Date: 2012-05-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u6Fixed 8 b34Fixed
Related Reports
Relates :  
Relates :  
Description
Bug Description:

Use suggested in 
http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/jreVersionCheck.html

to detect Jre installed in the user system since for Jre 1.7.0 and above, 
the plugin values are not stored in the registry.

deployJava.versionCheck(1.7.0_04)   (to check presence of Jre 1.7.0_04 )

The above method works fine and detects the Jre's but for Jre 1.7.0
installed in the system,  the above method returns true. Even if the check
is for 1.7.0_01, 02, 03 (or any other check for 1.7.0 and above ) , the
method returns true for Jre 1.7.0. Due to this, we face issues while
logging into our application using Jre 1.7.0 installed in the system.

Comments
EVALUATION problem: Install JRE 7 as only JRE in machine and check deployJava.versionCheck("1.7.0_04") - it return true, which is incorrect. fix: Bug in deployJava.js, function compareVersionToPattern. It is trying to handle exact match and family match with same logic, and failed to handle this specific case. (always skipping _04 part when we have 1.7.0 only) Modify with clear logic in compareVersionToPattern to handle mininum match (+), family match (*) and exact match. testcase: Install JRE 7 as only JRE in machine and check deployJava.versionCheck("1.7.0_04") - should return false.
2012-04-10

EVALUATION problem is actually in javascript part of DT, deployJava.js. In compareVersionToPattern, when matching with an update release, we failed to handle the case for first release of each family correct (1.7.0, 1.6.0, etc). And this problem is probably not a regression - you will probably run into same problem with 1.6.0. But that case was even before toolkit is introduced. Anyway - investigating for a fix now.
2012-04-10

EVALUATION workaround is to use deployJava.getJREs() and parse the return value instead. It will return all JRE versions installed in the system, and works fine with 7 and 7u4.
2012-04-10