r/java • • Jun 15 '21

The Impossible Java 11

https://carlmastrangelo.com/blog/the-impossible-java-11
197 Upvotes

37 comments sorted by

View all comments

8

u/khmarbaise Jun 15 '21

I have made the experience that the updates/code which does not work has been caused by deps or code which relies on internals (sun.*) etc. or some reflection magic like setAccessible(true) which causes issues. Otherwise based on the backwards compatibility of Java it was very smooth...even very old code runs/compiles on JDK11+...

8

u/brazzy42 Jun 15 '21

There is another rather silly cause of problems that shows up quite a lot: some projects parse the java.version system property to give a useful error message when run on a too-old java version. And that parsing code often didn't deal well with getting "11" instead of "1.8".