javajava-8version

Java Versions and Compatibility


I am confused about different versions.

I am a beginner, so forgive me if this is obvious, but... I am using JDK 20, which I see has some features in testing. On a separate computer, to test JAR files, I googled and downloaded the most recent version of Java, version 8u361, but not the JDK. This appears to be what someone who was not a developer would download.

My exported JAR files will not open and say that they were made using a more recent version. I was able to solve this problem by scaling back and using JDK 1.8, which allows java 8u361 to open them. Am I misunderstanding something. The most recent version of Java SE can't run anything that I make with JDK 17, 18, 19 or 20? I looked at a compatibility chart and couldn't reconcile this questions.
What is the JDK to Java SE equivalence?


Solution

  • "I googled and downloaded the most recent version of Java, version 8u361"

    That is NOT the most recent version of Java. You presumably looked at https://java.com/en which is entitled "Get Java for desktop applications". Look here instead: https://oracle.com/au/java/technologies/downloads.

    Since Java 9, Oracle's position is that it is the developer's responsibility1 to provide the JRE or JDK for running any desktop applications that they develop and distribute. See Oracle’s white paper, Java Client Roadmap Update, 2020-05.

    So you won't find Oracle or OpenJDK badged JREs for Java after Java 8. For post-Java 8, your options are:

    But to answer your question Java SE 8 (aka JDK 1.82) is 8uxxx, Java SE 9 is 9uxxx, Java SE 10 is 10uxxx and so on. There is no mystery to the compatibility / equivalency.


    1 - Oracle don't want to (unfairly) cop the blame for out-of-date / insecure Java installations dropped by application installers. And the don't want to (unfairly) cop the blame when an official Java patch release installed by the user causes an application to stop working. Dealing with these things is now 100% your responsibility as the app developer / distributor.
    2 - The Java 1.N versus Java N stuff is engineering vs marketing nonsense that started back in the early 2000's. Don't be fooled. And for more information about Java versions, see the Wikipedia Java Version History page.)