Java 16: Strongly Encapsulate JDK Internals by Default (JEP 396)

Опубликовано: 14 Октябрь 2024
на канале: CodeTips
713
6

From Java 16 onwards the internal elements of JDK are encapsulated by default.

Incase , if you want to access internal elements of JDK without any exception then you can use --add-opens command line.

java --add-opens=java.base/java.security=ALL-UNNAMED ExampleJep396