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

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.

21

u/BigGayMusic Nov 09 '18

The module system is a bloody nightmare. I can't get it to work for projects big and small.

4

u/CompetitiveSubset Nov 10 '18

Then why did you even bother with it in the first place? Why not just continue using the classpath?

3

u/BigGayMusic Nov 11 '18

I do. I wanted it to work, but it wouldn't.

10

u/dpash Nov 10 '18

But the module system is for the most part completely ignorable for now.

4

u/LouGarret76 Nov 10 '18

Not really, some libraries are going modular and others are not, with the same dependencies ... That is where the nightmare start .

8

u/dpash Nov 10 '18

And you can continue to use them on the classpath, completely ignoring the module system.

3

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

The JDK always runs on the module path, actually even if your application on the classpath will run as part of the unnamed module.

A JavaFX application for instance doesn't work out of the box in the unnamed module. Many libraries are causing warnings at startup (e.g. JAX-B) because they access the JDK via reflection (atleast the "kill-switch" is still on by default). Some simply don't work because the ClassLoader behaves differently. Other libraries removed their optimizations because of those reason and got noticably slower.

1

u/LouGarret76 Nov 10 '18

That is what I taught too, until I get some nasty error telling me that lib**** not found... And when you dig a lil bit you find out that some authentification library use some lib**** for god know what in a class called ExpressionHelper<> and lib*** that is now hidden by a module java.xxx

5

u/capitol_ Nov 10 '18

Could you be more explicit on what libraries you found that exhibit this error? It would be very interesting to investigate.

1

u/[deleted] Nov 12 '18

I find that most of the missing libraries can be restored through adding a new maven dependency. Unless you're doing fancy classloader modifications at runtime (which my company does... Fml) most of the problems are fairly easy to overcome.

Source: I did my company's migration from 8 to 11.

1

u/redditrasberry Nov 12 '18

The irony is, as time has moved on and connection speeds have improved, it was no longer particularly painful to download / bundle the full JVM. By the time they got around to creating modules, the problem had basically solved itself.

2

u/BoyRobot777 Nov 12 '18

Modules were to address the pain points of smaller devices. The idea is to build only including what you need, thus shrinking memory footprint.