FULL PRODUCT VERSION : java version "1.6.0-beta2" Java(TM) SE Runtime Environment (build 1.6.0-beta2-b83) Java HotSpot(TM) Client VM (build 1.6.0-beta2-b83, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP [Version 5.1.2600] A DESCRIPTION OF THE PROBLEM : When locating a resource in a jar getResource returns the jarfile on the server instead of the file in the webstart cache STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Have a classloader locate a resource in a jar file to figure out where the jar file is located EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - resourcePath should be something like jar:file:/C:/Documents and Settings/BS/Application Data/Sun/Java/Deployment/cache/javaws/http/Ddkegh408/P8046/DMV3R1/DMDev/DMeXposer/RMconfig.jar!/eXposer.properties ACTUAL - jar:file:/dkegh408:8046/V3R1/Dev/eXposer/config.jar!/eXposer.properties REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- package webstartapplication; public class Main { /** Creates a new instance of Main */ public Main() { } /** * @param args the command line arguments */ public static void main(String[] args) { ClassLoader cl = Main.class.getClassLoader(); String resourcePath = cl.getResource("test.properties").toString(); System.out.println("resourcePath = " + resourcePath); } } <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd"> <jnlp codebase="$$codebase" href="WebstartApplication.jnlp"> <information> <title>WebstartApplication</title> <vendor>Company, Inc.</vendor> <homepage href="homepage.html"/> <description> </description> <icon href="default"/> <offline-allowed/> </information> <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> </resources> <resources> <jar download="eager" href="WebstartApplication.jar" main="false"/> </resources> <application-desc main-class="webstartapplication.Main"/> </jnlp> ---------- END SOURCE ---------- Release Regression From : 5.0 The above release value was the last known release where this bug was not reproducible. Since then there has been a regression.
|