JDK-6698636 : Java Plugin in Firefox hangs since 6u4 when remote policy file is present in java.security
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u4
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-05-07
  • Updated: 2010-09-08
  • Resolved: 2008-06-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.
6u10 b26Fixed
When a remote policy file is being used in java.security then firefox will
hang as soon as any applet is being accessed. This worked for 6u3 and earlier.
The bug was introduced in 6u4 and is still there in the latest 6u10beta of May1st.

This is reproducible always on Windows Steps to reproduce:

Install 6 u4|5|6|10beta
Make sure that the plugin is configured for both
IE and Firefox.

Then modify jre\lib\security\java.security like this:

#policy.url.2=file:${user.home}/.java.policy    <<<< comment out
policy.url.2=http://aubing.germany/ourpolicy.policy <<<< insert

The remote policy file normally contains some grant statements.
For testing, just an empty remote policy file will do.
The link above to aubing.germany points to the empty file

Start IE and access load any demo applet such as 
This will work as expected.

Then do the same with firefox. Watch the hang. A thread dump is 

SUGGESTED FIX testcase: http://eltanin.east.sun.com:8000/dennis/bug/dolphin/6.0update/6698636/unitTest.html webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6698636.0

EVALUATION This is caused by a fix in 6u4 to reorder when to create Java plugin viewer. The url connection in java.security is happening early then Java plugin viewer has been created, therefore it won't be able to find correct Mozilla proxy info and causing hanging (which is a bug in our code and it has never be exposed).