JDK-8134114 : Need to append javafx module entries to java.policy file
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 9-repo-jigsaw
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-08-20
  • Updated: 2016-01-06
  • Resolved: 2015-08-26
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 9
9-repo-jigsawFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The JavaFX runtime needs to be granted permissions in order for it to run. We are now running in the ext classloader again in Jake, but that isn't sufficient to have permissions granted.

Comments
http://hg.openjdk.java.net/openjfx/sandbox-9-jake/rt/rev/b8d41d21f899
29-10-2015

I did a clean build of JDK and everything looks fine now.
26-08-2015

I verified that the build now works, so I have pushed the changes to FX to deliver the java.policy.extra file. I also checked that the java.policy.extra file is imported into the right place in build/configure-support/import-modules, but it isn't being appended to the conf/security/java.policy file.
26-08-2015

I've fixed the importing mechanism in jake now so you may go ahead and try with a java.policy.extra file.
24-08-2015

Looks like I'll have to wait until the JDK build is ready for this. If I deliver modules_conf/java.base/security/java.policy.extra in the module imports today I get the following error: ... Creating java.base.jmod Error: file already exists: /localhome/kcr/java/jdk9-jake/build/linux-x86_64-normal-server-release/support/modules_conf/java.base make[3]: *** [/localhome/kcr/java/jdk9-jake/build/linux-x86_64-normal-server-release/images/jmods/java.base.jmod] Error 2 make[2]: *** [java.base-jmod] Error 1
21-08-2015

Given the discussion on jigsaw-dev, which I just saw, I revise my suggestion and instead propose: modules_conf/java.base/security/java.policy.extra
21-08-2015

Hmm, in the jdk build, we have two sources for java.policy: jdk/src/java.base/share/conf/security/java.policy jdk/src/java.base/windows/conf/security/java.policy During the build those are concatenated. Note that they are all in the java.base module, while containing configuration for a bunch of other modules. To fit with this model, you should put your collected additions in: modules_conf/java.base/security/java.policy However, I think this is actually wrong. It would make much more sense to me if the policy file was merged at link time with input from each module being linked. But perhaps that's too big a change to the jigsaw model?
21-08-2015

That sounds fine to me. I will add it.
21-08-2015

In JDK 9 mainline we append a single entry to java.policy to grant permissions to jfxrt.jar. We do this by delivering a single "javafx-java.policy" file to the install build, which appends it to java.policy (see JDK-8042868) . In Jigsaw we will need similar entries, one for each module. For example, the entry for javafx.base would be: grant codeBase "jrt:/javafx.base" { permission java.security.AllPermission; }; For consistency, I think that "java.policy.extra" might be a good name for this file. Should this go in module_src/${MODULE} or in make/${MODULE} or somewhere else?
20-08-2015