Recently I was asked from a developer for more specific reasons about migration to Java 11 from Java 8, due to unwillingness to migrate. The project is written in Kotlin and development is stopped for months, but new features planned to come in. The opposite side mainly says:
- It’s difficut to migrate and requires lots of work
- We use OpenJDK and there is no support from Oracle at all, so it doesn’t matter that Oracel ends LTS(long-term support) in 2019/2020
I often follow the guildance from the community and security expert and inclined to update to the next stable version rather than not to do, and prioritize upgrade task very high. Thus, when receving the instruction for migration from java 8 to java 11, it does not need several reasons to convice me. Alright, I also read the summaried reasons from microsoft https://docs.microsoft.com/en-us/azure/java/jdk/reasons-to-move-to-java-11
There was the other main reason to migrate in my past experience. My previous collegues experienced issue when implementing a security feature using Spring Boot with Java 8 (Very difficult to find the Jira ticket number, I hope to obtain this info in the future)
Ok, to argue with the opposite side, let’s talk about the second argument first. The main misunderstanding is that Oracle stops LTS in 2020, and it doesn’t affect OpenJDK that we use, because we don’t have support from Oracle.
Talking about OpenJDK, it’s an adjective. There are lots of providers. and AdoptOpenJDK is one kind of distribution(binaries) provided by RedHat. But it’s wrong that when Oracle ended LTS of Java 8, it doesn’t affect OpenJDK. Oracle contributes to OpenJDK by releasing updates to OpenJDK distribution (binaries), versions including most recent Java release and LTS (long-term support) releases. ref :https://stackoverflow.com/a/52431765/3952994.
This would mean after 2020, there will be no contribution from Oracle for Java 8.
If the opposite side still asks about how much the effect will be? I think you can still further find the information in OpenJDK site.
One Apache top project has expilicit ticket description mentioned Java 8 is dead. https://issues.apache.org/jira/browse/FLINK-10725
Java 8 is over 5 years old and will be end of life in 2019/2020. Java 11, the latest long-term support release, became GA in September 2018.
That said, this open source community considers losing contribution from Orcale as an important effect. Therefore, if we want to develope our project, we shouldn’t use a dead version.
Back to the first argument. Is migrating to Java11 difficult? Microsoft summarizes how they migrate to Java 11: https://docs.microsoft.com/en-us/azure/java/jdk/transition-from-java-8-to-java-11 .
In general, the approaches are to try to run on Java 11 without recompiling, or to compile with JDK 11 first. If the goal is to get an application up and running as quickly as possible, just trying to run on Java 11 is often the best approach. For a library, the goal will be to publish an artifact that is compiled and tested with JDK 11.
Any concern regarding to the difficulty could be resolved by following the guildance from Microsoft. I believe in a very strict siutaion, you would probably have to cut the application in Java 8 into two parts. One still in Java 8, and the other in Java 11.
I could think of one other argement — the application will be deprecated soon, so no need to spend time on the migration. Well, I saw cases that this kind of application after months required development again. The application is running and brings revenue, only when a replacement is being developed, “the application will be deprecated soon” is true.
Hope this article helps you to convince others to migrate from Java 8 to Java 11!