Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 10 migration from Java 8. Running services in production [closed]

We want to migrate all our production services to Java 10 from Java 8. As I understood, we might face issues with builds (gradle etc.), dependencies etc. for development. But when it comes just to the JVM itself, i.e. running services, will we face any issues if we just install JVM 10 in production to run our jar services?

like image 837
Mark Avatar asked Aug 24 '18 05:08

Mark


People also ask

Why are companies still stuck on Java 8?

There's a mix of different reasons companies are still stuck with Java 8. To name a few: Build tools (Maven, Gradle etc.) and some libraries initially had bugs with versions Java versions > 8 and needed updates.

Why was Java EE removed?

Java EE module has been removed due to overlap with the Java EE platform specification. The CORBA module has been removed due to evolving independently of Java SE.

Is Java 8 backwards compatible?

Incompatibilities between Java SE 8 and Java SE 7. Java SE 8 is strongly compatible with previous versions of the Java platform. Almost all existing programs should run on Java SE 8 without modification.


2 Answers

I'm not sure why this has been downvoted since it seems a reasonable question.

Oracle's own guidance for moving applications from JDK 8 and earlier to JDK 9 and later is "applications that just use java.se should just work". If you have not used (directly or indirectly via a third-party library or framework) any JDK internal APIs (sun.misc.Unsafe is the most infamous) then you can leave all your application code on the classpath and this will most likely work without change. There are a few differences that might catch you out with changes to things like command line flags.

I've written two blogs on this, which might be helpful to you:

https://www.azul.com/jdk-9-pitfalls-for-the-unwary/

https://www.azul.com/jdk-10-pitfalls-for-the-unwary/

You should also bear in mind that it doesn't make any sense to migrate to JDK 10. JDK 11 will be released next month and, at that point, updates for JDK 10 will stop. It would be better to migrate to JDK 11. If you're looking for long-term support Oracle is now charging for this. Check out our Zulu OpenJDK builds.

like image 108
Speakjava Avatar answered Sep 22 '22 17:09

Speakjava


A good starting point is the JDK Migration Guides on the Oracle download site. The JDK 10 Migration Guide covers migration from JDK 8 to JDK 10 and can be found here:

https://docs.oracle.com/javase/10/migrate/toc.htm

Another good resource is the JDK release notes as these include notes on the known source, binary and behavioural compatibility issues. You can find the release notes for the JDK 9 and JDK 10 releases linked from here:

https://www.oracle.com/technetwork/java/javase/jdk-relnotes-index-2162236.html

Another resource is the videos from conferences. I've prepared several times on the topic of migrating to JDK 9 and beyond. A recent one from Devoxx BE 2017 can be found here:

https://www.youtube.com/watch?v=uSR5JroBp34

like image 28
Alan Bateman Avatar answered Sep 23 '22 17:09

Alan Bateman