

Under the current JDK release model, a new feature release with a new major version number is planned every six months, in March and September. Make sure, you have the latest patch level 17.0.3 or later, due to CVE-2022-21449. ✅ Recommendation: Use Adoptium Eclipse Temurin 17 and ensure that your local version matches the CI and production version. This site gives independent, yet opinionated recommendations. These distributions differ in licenses, commercial support, supported platforms, and update frequency. The OpenJDK is the open source reference implementation of the Java SE Specification, but it is only the source code.īinary distributions are provided by different vendors for a number of supported platforms. The former seems to work when Java 8 is listed first the latter when Java 11 is first.To build and run Java applications, a Java Compiler, Java Runtime Libraries, and a Virtual Machine are required that implement the Java Platform, Standard Edition (“Java SE”) specification. Depending on which one I have listed first in my Path variable, I get different results when i run java -version or java -version. In my case, that helped me determine that I have java.exe and javac.exe at C:\Program Files (x86)\Common Files\Oracle\Java\javapath and C:\Program Files\Common Files\Oracle\Java\javapath. And it doesn't change even if I point my JAVA_HOME to JDK 11. That's despite java -version showing version 11.0.15. Seems like java -version used to be a way to do this, but no longer.Īdding to the complexity, you can also supposedly get your Java version info from Control Panel > Programs > Java > About. (I'm not even sure where the version 11 it found came from possibly from when I installed maven.)ĭetermining the difference between the JRE and JDK you're running has never been straightforward. This is confusing because my Java compiles (e.g., via mvn) use JDK 8 since that's what my JAVA_HOME is pointing to. Note for comparison that java -version does not reflect my JAVA_HOME location and in fact shows java version 11 instead of 8: C:\Users\me> java -version

For example, the 3rd line here reflects my JAVA_HOME location, where I'm pointing to JDK 8: C:\Users\me> where javaĬ:\Program Files\Common Files\Oracle\Java\javapath\java.exeĬ:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exeĬ:\Program Files\Java\jdk1.8.0_202\bin\java.exe This lists any and all locations of java.exe, including from your JAVA_HOME.


To get your jdk location in Windows, run this at a command prompt:
