JDK 8 is the past, Now we have JDK 17
This was the discussion between me and my friends on which is the best JDK version we should use at the moment.
Today let us talk about this.
1. Do not always choose the latest version of JDK , for example JDK 19
Why? Because when you started to use the latest JDK version, there are not so many people used it. The bug/defects generation possibility will be far more than other LTS(Long Term Support) JDK. Also generally speaking , it has only 6 months support, Later you still need to upgrade the version as well. This is why most of the companies do not want to choose the latest JDK version as their project development base.
2. Choose the JDK version with LTS(Long Term Support)
LTS means that even if there is newer version introduced, the LTS JDK will still in support and will be updated for very long time period.
Except the LTS version, more version are the the feature version, for example most latest version - JDK 19
Current LTS version are JDK 8, JDK 11 and JDK 17.
领英推荐
Most of the projects and applications are still in either JDK 8 or JDK 17. But I think it should be upgraded to JDK 17 soon.
So please start to move away from JDK 8 or JDK 11. At least you should get it on JDK 11. No more JDK 8.
Why? For example, if you used JDK 11 to write java program, it is faster and more secure compare to use JDK 8, especially JDK 11 has upgraded GC already.
Also JDK 17 has rewrite the NIO, it is faster than JDK 11 again.
Compare to the JDK older version, For example, JDK 11 has riteString(), readString(), and isSameFile() and so on.
Most of the common open source technology have started to align with most latest LTS versions as well. For example, Jenkins is only supporting JDK 11 or JDK 17, if you installed JDK 19, it will compatible with Jenkins then.
Spring 6.0 is only supporting JDK 17+.
So the recommendation will be start to use JDK 17 or migrate to JDK 17.