FULL PRODUCT VERSION : java version "1.6.0_19" Java(TM) SE Runtime Environment (build 1.6.0_19-b04) Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP Service Pack 3 A DESCRIPTION OF THE PROBLEM : Querying the resource URL of a directory, e. g. Example.class.getResource("/example/"), triggers the mixed code warning introduced in JRE 1.6.0_19 even if all classes and resources in the Jar are signed. We use this to get a list of all files in the directory as in ((JarURLConnection) getResource("/example/").openConnection()).getJarFile() and then iterating over the entries of the Jar file. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Create a Jar file which contains a directory ("example") and a class which does a getResource for the directory (Example.class.getResource("/example/")). 2. Sign the Jar file with jarsigner 3. Write a JNLP file which launches the Jar 4. Launch with Java Web Start EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - No mixed code warning shown, getResource returns a JarURLConnection ACTUAL - Mixed code warning, if user clicks "Yes", getResource returns null. REPRODUCIBILITY : This bug can be reproduced always. CUSTOMER SUBMITTED WORKAROUND : Instead of getResource("/directory/"), access a file which you know exists in the directory, e. g. getResource("/directory/KNOWN_FILE")
|