Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

I got my application running with JRE build 9-ea+163 by passing the --permit-illegal-access flag to the VM. Now I want to start the app with Java Webstart. A first try with

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 the flag.

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

Does Webstart support the --permit-illegal-access flag?

Can I furthermore specify the flag in the 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.

P.S.: Setting the env variable JAVA_TOOL_OPTIONS to --permit-illegal-access works, but is not a solution since the clients are not accessible.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Java Web Start does not support the --permit-illegal-access option. JNLP apps that need to break encapsulation should use the precise options, there is support for both --add-exports and --add-opens.

about 4 years ago · Santiago Trujillo Report

0

This worked for me. Add the following flag to vm argument:

java --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED -jar mySpringBootApp.jar
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!