Search code examples
javajvmjvm-hotspot

Why does java-11 version command shows java 18.x as output?


Why does java-11 version command shows java 18.x as output -

$which java
/Users/friendly/Documents/jdks/jdk-11.0.17.jdk/Contents/Home/bin/java
~$java --version
java 11.0.17 2022-10-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.17+10-LTS-269)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.17+10-LTS-269, mixed mode)

First line of output is fine as expected --> java 11.0.17 2022-10-18 LTS

Why are the Runtime and Hotspot versions -> 18.9

Java(TM) SE Runtime Environment 18.9 (build 11.0.17+10-LTS-269)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.17+10-LTS-269, mixed mode)

Seems there is more I should know regarding how Java versions it's internal components.
Could some one enlighten.


Solution

  • you are using java 11, the 18.9 refers to the date it was released - 09/2018