JDK-7182185 : Fails to run applet that requests to be executed with installed 1.4.2_XX JRE
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u33-rev,6u34
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2012-07-06
  • Updated: 2012-07-16
  • Resolved: 2012-07-16
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 Availability Release.

To download the current JDK release, click here.
JDK 6
6u33 b34Fixed
Related Reports
Relates :  
Description
Short desc: 
   6u34 b03 fails to run applet that requests 1.4.2_XX JRE with exception:

-----------------------------------------------------------------------------
basic: Plugin2ClassLoader.addURL parent called for http://vice.russia.sun.com/newroot/testsuites/160_int_ws/deployment/src/plugin/MultiJRE/MultiJRE/classes/142/MimetypesUnsigned.jar
basic: exception: java.net.URL.toURI()Ljava/net/URI;.
exception: java.net.URL.toURI()Ljava/net/URI;.
java.lang.NoSuchMethodError: java.net.URL.toURI()Ljava/net/URI;
	at com.sun.deploy.security.DeployURLClassPath.addURL(Unknown Source)
	at java.net.URLClassLoader.addURL(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.addURL(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.addURL(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.addURL(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.addJar(Unknown Source)
	at sun.plugin2.applet.Applet2Manager.loadJarFiles(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NoSuchMethodError: java.net.URL.toURI()Ljava/net/URI;

-----------------------------------------------------------------------------

Looks like CR 7119269 causes this issue.

Comments
EVALUATION URL.toURI() method which is used in 7119269 fix was introduced in 1.5, so it won't work with 1.4.2. To make this code compatible with 1.4.2, I'll use direct implementation of toURI() instead: "new URI (URL.toString())" I believe that jdk7 and jdk8 versions of 7119269 fix will fail on 1.4.2 env as well. I'll open respective subCRs.
10-07-2012

EVALUATION In 7 and 8 codebase we are not using URI.toURL(). Using internal URLUtil.normalizeURL() instaled and it is 1.4.2 friendly. JRE6 should either introduce utility class or simply use "new URL(URI.toString())". This will work fine with 1.4.2.
07-07-2012