r/javahelp • • Oct 11 '19

Why we still use java 8

Hey everyone
I know that new releases of java bring us new compilers and vm optimization and new language features.

So, why developers still use java 8 for their projects ?

PS: sorry if question is weird or stupid. do not hate me in comments pls.

27 Upvotes

51 comments sorted by

View all comments

2

u/PseudosSC Oct 11 '19

Because moving something from 8 to 11 is not trivial. With the module stuff added in 9 you can’t just build with a new version and be done with it (which MOSTLY worked 7-8, and 9/10-11).

Meaning it takes time, and possibly a senior dev. Good luck convincing a project manager to allocate budget for that when it could be used for new features/bug fixes/pure support income.

2

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Because moving something from 8 to 11 is not trivial.

It's pretty trivial. If you're not doing nasty stuff with sun.misc.Unsafe it's generally a matter of making a few Java EE dependencies explicit.

1

u/wildjokers Oct 12 '19

8 to 11 is not as difficult as people make it out to be. I have upgraded several apps to 9 (where modules become a concern) and all you do is add dependencies for the JavaEE code that was removed from the JDK. (with JAXB being the the most common).

I guess some people forget that prior to Java 1.6 JAXB was not in the JDK and you added it as a dependency. It was added to the JDK in 1.6. Then deprecated in 9 and removed in 10 (or 11). So it is just back to the way it was. It's trivial.

1

u/PseudosSC Oct 12 '19

I’m glad your experience is better than mine! I’m guessing it depends on what’s in the project, possibly? Those we tried devolved into hellish ordeals.