- Java 9:Building Robust Modular Applications
- Dr. Edward Lavieri Peter Verhas Jason Lee
- 73字
- 2025-04-04 17:08:34
The --permit-illegal-access option
A third option for breaking encapsulation is to use the --permit-illegal-access option. Of course, it is prudent to check with third-party library creators to see if they have an updated version. If that is not an option, you use --permit-illegal-access to gain illegal access to operations to be implemented on the classpath. Due to the significantly illegal operation here, you will receive warnings each time one of these operations occurs.