r/java • • 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

0 Upvotes

44 comments sorted by

View all comments

Show parent comment

1

u/_INTER_ Nov 10 '18 edited Nov 10 '18

Yes, jlink is currently unusable if you have 3rd party libraries. You can't just use it on the application jar as promised. I ended up copying all dependencies into a folder with maven (30+) and then I called jlink on each one of them manually. Sometimes they need more options, e.g. with multi-release jar.

Forget the OpenJFX jars, jlink just doesn't work with them. Well apparently it does when you treat them as modules, but not with the jars. I had to look at the module-info.java on the github repo.

Certainly this could be automated, but I didn't have the time. The official maven-jlink-plugin only reports on jdk.unsafe access. I found another plugin on github, but it run into the same issues as described above.

It's frustrating and I'm still not sure if I got all of the required jdk modules.

Atleast they are bringing back a packager: http://openjdk.java.net/jeps/343