United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7160385 REGRESSION: Jre DeployJava issue with Jre 1.7.0
JDK-7160385 : REGRESSION: Jre DeployJava issue with Jre 1.7.0

Details
Type:
Bug
Submit Date:
2012-04-10
Status:
Closed
Updated Date:
2012-05-10
Project Name:
JDK
Resolved Date:
2012-05-10
Component:
deploy
OS:
windows_xp
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

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

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
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

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
SUGGESTED FIX

http://closedjdk.us.oracle.com/jdk8/deploy/deploy/rev/70211df3263e
                                     
2012-04-10



Hardware and Software, Engineered to Work Together