How to pass Java 9 flag '-permit-illegal access' to a Webstart application?

I got my application working with JRE build 9-ea + 163 by passing the --permit-illegal-access flag to the virtual machine. Now I want to run the application with Java Webstart. Try first

 javaws -J--permit-illegal-access <JNLP-Url> 

does not work. I get the same InaccessibleObjectException with module java.base does not "opens java.util" to unnamed module , as without a flag.

Adding <j2se java-vm-args="--permit-illegal-access" version="9*"/> to JNLP does not help.

Does Webstart --permit-illegal-access flag?

Can I specify a flag in a JNLP file?

Btw, with Java 9

 javaws https://docs.oracle.com/javase/tutorialJWS/samples/deployment/NotepadJWSProject/Notepad.jnlp 

throws an IllegalAccessException and -J--permit-illegal-access doesn't help either.

PS: Setting the env JAVA_TOOL_OPTIONS variable to --permit-illegal-access works, but is not a solution, as clients are unavailable.

+7
java java-web-start jnlp java-9
source share
1 answer

Java Web Start does not support the --permit-illegal-access option. JNLP applications that need to break encapsulation must use the exact parameters; there is support for both --add-exports and --add-opens .

+7
source share

All Articles