7 ms·
> Now if you want to really abuse Java, try this one : This is no longer possible out of the box after "JEP 403: Strongly Encapsulate JDK Internals" [1]. [1]
by kasperni 5y ago
> Now if you want to really abuse Java, try this one :
This is no longer possible out of the box after "JEP 403: Strongly Encapsulate JDK Internals" [1].
[1] https://openjdk.java.net/jeps/403 https://openjdk.java.net/jeps/403
- hyperman1 5y agoThat will teach me to test on Java 8. Oh well. The whole point was it was a bad idea. UPDATE: I see there is a flag --illegal-access=permit so if you want to abuse Java, you can still go ahead ;-)
- hashmash 5y agoOpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0
- hyperman1 5y agoDamn you guys/girls are fast.
- dpratt 5y agoAs of Java 17, no longer. This option was intended as a migration path for badly behaving code, and as of today it no longer works.
- kasperni 5y agoSupport for --illegal-access=permit was removed with Java 17. But you can use "--add-opens=java.base/java.lang=ALL-UNNAMED" instead if you really want. If you really want to shoot yourself in the foot. You can always go native...