Ivgi
Ivgi

Reputation: 551

Java versions confusion

I want to install Java on a few different servers for running a third party service on tomcat. I am not a Java developer and I got a bit confused when I began searching for the installer.

I checked the different Java versions and their long term support dates. It seems that Java 11 JDK is - LTS so i decided to use it. But when I was trying to find a runtime version (JRE?) since this is the version I am supposed to install on the server(?) I only found Java JRE 8.X.X, and this got me confused.

There is no higher major version of the JRE? How does it work if you use the JDK 11 or even 14-15 as a developer and then use Java 8 JRE on your deployed servers?

Maybe the JDK holds inside of it the Java 8 JRE version? Or do you actually need to install the JDK version on the servers instead?

Upvotes: 1

Views: 262

Answers (2)

Ivgi
Ivgi

Reputation: 551

After some research,

It seems there is no separate JRE section anymore. Also JDK 11 for production is not free and I guess this is an ongoing trend for the near future.

On a side note there is the open JDK 11 version but it does warn you about outdated security updates.

So basically in my case sticking to updated Java JRE 8 version is good enough for the near future.

Upvotes: 0

Donat
Donat

Reputation: 4833

The JRE is a subset of JDK. It contains everything needet to run Java applications but no support for development. So, if you need a JRE, a JDK is also good, although it conatins much stuff that you will not need.

Normally, for executing a Java application, you need a JRE with the same version or higher than the JDK used for development. But the developer can advise the compiler to generate code for a lower version. If he does so, he cannot use the features of the higher versions. For example the compiler of JDK 1.8 can produce code for JRE 1.6. You should consult the manual, to see which old versions are supported by the compiler of a specific version.

Upvotes: 1

Related Questions