JDK-8044055 : jfxrt.jar has a duplicate JSObject class without getWindow(Applet)
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-05-27
  • Updated: 2017-05-17
  • Resolved: 2014-06-10
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.
8u20 b19Fixed 9Fixed
Related Reports
Relates :  
See https://javafx-jira.kenai.com/browse/RT-30622 for a description of the problem.

This is a regression introduced in JDK 8 by the inclusion of jfxrt.jar in lib/ext such that it is loaded by default, and will take precedence over classes loaded from plugin.jar.

The root cause of the problem is that jfxrt.jar and plugin.jar each has a copy of netscape.javascript.JSObject, and the copies are divergent.

Verified with 8u20 b20

The problem caused by the two divergent classes is that applications will fail to compile if the wrong class is chosen. By default, the one from jfxrt.jar will be used, and that copy is missing the getWindow(Applet) method. If plugin.jar is added to the boot classpath, then that copy will be used, but it is using a pre-varargs array of Objects for the arguments of the call method, so an application could get a compilation error as a result. The proposed fix will unify the two divergent copies of the JSObject class as follows: 1) In the JavaFX copy of JSObject: add the static getWindow(Applet) method 2) In the Plugin copy of JSObject: change the signature of the call(String, Object[]) method to call(String, Object...) More details of the evaluation are in the FX bug: https://javafx-jira.kenai.com/browse/RT-30622

https://javafx-jira.kenai.com/browse/RT-37238 is follow-on work that can be considered for JDK9 (it is out of scope for an 8 update release).

This issue should also consider https://javafx-jira.kenai.com/browse/RT-37238.

Changes will be needed in both FX and JRE (plugin) in order to resolve this issue. https://javafx-jira.kenai.com/browse/RT-30622 will track the FX changes. JDK-8044055 will track the plugin changes.

See https://javafx-jira.kenai.com/browse/RT-30622 for an evaluation.