JDK-8091744 : Modular java: remove /lib/ext/jfxrt.jar from java.policy
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 9
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2015-01-02
  • Updated: 2015-10-29
  • Resolved: 2015-10-29
Related Reports
Duplicate :  
Description
I was looking at a EA release of the Java 9 JDK (after the Modular java merge) and I saw something in the java.policy which shouldn't be there since the lib/ext directory no longer exists[1].

The java.policy contains two entries of which the second one is no longer valid:

grant codeBase "file:${java.home}/lib/jfxrt.jar" {
    permission java.security.AllPermission;
};
grant codeBase "file:${java.home}/lib/ext/jfxrt.jar" {
    permission java.security.AllPermission;
};

This is introduced with: https://javafx-jira.kenai.com/browse/RT-36848 and was correct at the time of implementation, but the /ext/ version should be removed now in the JDK 9 branch.

[1] http://openjdk.java.net/jeps/220 Removed: The extension mechanism
Comments
I am closing this as a duplicate of JDK-8134114 which is fixed in the jigsaw repo.
29-10-2015

This will likely be fixed as part of a larger cleanup after the next phase of Jigsaw is done, since jfxrt.jar will be gone at that point.
22-08-2015

Yes, this is a bit of cleanup that should be done. We intentionally left both in during the transition so that the same FX bundles could be imported into both a modular JRE and a non-modular JRE, and also we currently share the same file for JDK 8 and JDK 9. Once we break the automatic syncing between FX 8u-dev and 9-dev then I will fix this. I note that both entries can eventually be removed, since we plan to modularize FX at which time jfxrt.jar will go away (in fact, it could be removed earlier, since the modular JRE automatically applies the necessary permissions to jfxrt.jar).
05-01-2015