Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Which JDK should I use now?

1 min read

Choosing a JDK to base your code on used to be so much easier when there was a new Java release only every decade or so… Now we get a new version of Java every six months. So which version should you use?

The first thing to understand is that not all JDK releases are created equal. Some of them are Long Term Releases (which will be supported for years to come) and others will be replaced after six months  by Oracle (although other companies may offer longer term support). Long Term Releases were Java 8 and Java 11, while Java 9, 10 were short term (as is Java 12).  Official end of support dates are on the Oracle website.

Later releases contain lots of features, which make it much easier and quicker to write good quality code. So there is a classic trade-off between new features and backwards compatibility.

So here are our personal suggestions…..

We need to write code which needs to use lots of legacy libraries and needs as few changes as possible

  • Stick to Java 8. You get all the benefits of Lambdas and streams and Oracle will support for some years to come.

We are starting a new project and want to get all the benefits of modern Java but need some stability.

  • Use Java 11. You get all the benefits of Lambda, streams, jigsaw and years of support.

We are starting a new project and want to get all the benefits of modern Java but development will take some time before we need to standardise

  • Use Java 12/13 and aim to stabilise code use on Java 14 . You get the latest version of Java with a good long-term support timetable.

I personally would not recommend Java 9 or Java 10 unless you have very specific use cases (like we really want Java 8 plus jigsaw in which case you can create a multi-jar file and get both).

This month we are looking at which version of Java you should be running. In our related articles, we look at Java 8 vs Java 11Using JavaFX with Java 11 or Higher

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2019. All rights reserved.