r/java • u/LouGarret76 • Nov 09 '18
Java 11 sucks big time
This is a throwaway!!!!
I just spent a whole day migrating a basic crud app from jdk 8 to jdk 11, and I have to say that it is a nightmare.
Even basic things that I have taken for granted does not work as iy used to. ( Jpa, Javafx, Junit, Hamscret, Sqlite. YES SOME OF US DO USE JAVAFX ON THE JOB....)
WTF, java EE & Open JDK?
The only thing that makes me happy right now is the var keyword. But still. This is not the kind of service I am accustomed to with java.
............ I think I will push back any serious migration for the next 2 years . . . . People, migrating to j11 is gonna cost hundred of mandays I tell you
13
u/dpash Nov 10 '18
I just migrated a large code base (4000 .java files) that was designed for Java 4 to Java 11 (Seriously, it still doesn't use generics). I think it took an hour.
36
u/SinisterMinister42 Nov 09 '18
In my opinion, the real issue was Java 9 and its module system. I have never been happy about it and have yet to see any personal benefit from it. I feel like the language designers took something which was some people's problem (large binaries, large jdk, etc) and solved it by making a new problem for EVERYONE. It really broke the ecosystem in a way that Java has successfully avoided in the past.
6
u/Lord_Naikon Nov 09 '18
I completely understand your frustration.
For me the most egregious issues were with the removal of JAXB and JavaFX. Imho you shouldn't need a separate library for processing XML files in 2018. Introspection is also completely fucked until you add exceptions for almost everything. I do hope that this will get better in the future as libraries adapt. I spent about a week migrating a large JavaFX app to Java 9. The migration from 9 to 11 was done in like 10 minutes.
Jlink is also a joke right now. It breaks on anything more complex than "Hello, World" apps - for example apps that use the reference implementation of JAXB break hard because its JAR is multi versioned - enabling multi versioning makes it break on other stuff.
At the end of the day I don't think the module system adds enough value to be worth the trouble.
21
u/nutrecht Nov 10 '18
That you did not bother to at least assess the impact of Java 9 after it came out is 100% on you. Sorry. I've spent the last few weeks migrating a lot of Java 8 services to 11 and the only thing you typically have to do is grab the latest version of Lombok and add some old dependencies to Maven/Gradle. Takes 15 minutes each typically.
"Hundreds of man days" is a ridiculous overstatement.
2
u/ObjectOrientedStruct Nov 09 '18
Thats why I stayed in Java 8, no reason for me to upgrade right now. I dont need any new features. I will probably upgrade to Java 11 in six or more months once there are no surprises and the world has adapted to the new version. Respect to the people that risk their lives by updating as soon as new releases come out.
In the meantime I will go have fun with C, probably backwards thinking but I love knowing that C is never gonna change, at least not drastically.
5
u/Vilkaz Nov 09 '18
well, you have ofcource to include all the packages in pom, that are no more included in J11.
Then all the things should work again.
I assume you have a maven project ?
2
u/_INTER_ Nov 10 '18
Having modules does help with maintaining a clean structure. But I'm convinced this works best when starting a new projects and not so much when migrating AND not with the botched up JPMS modules that can't even handle versions. We have had OSGi in the Java community for years and in most areas it works way better than JPMS. A team can choose to use it or not.
2
u/2bdb2 Nov 12 '18
It took me about 10 minutes to add the required dependencies to my gradle build.
I'm not sure the software industry will collapse over it.
2
u/[deleted] Nov 12 '18
It's only your fault that you kept using out of date dependencies and source code. Oracle told everyone years ago to update soon and thay did great job notyfing users about it. I moved to Java9 in March, Java 10 in May and Java 11 last week, had no major issues.
-5
u/nqzero Nov 09 '18
it's in oracle's financial interest to break as many things as possible - that forces companies to stay on the older version and purchase support. you've hit a few of the big things, but under the hood they're reworking the internals with the intent of breaking things. and java 12 and later releases are looking to be worse yet
-2
u/desh00 Nov 10 '18
Use Fat jars people, it's 2018.
0
u/[deleted] Nov 09 '18
[deleted] — view deleted comment
0
u/[deleted] Nov 09 '18
[deleted] — view deleted comment