Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Why do I see open JDK 1.8 instead of Java 8?

Writer Matthew Martinez

When I check my Java version like this:

java -version

I see openjdk version 1.8.0 runtime environment build ..., but I thought I had Java 8 installed.

Why does the version number show up as 1.8?

5

2 Answers

From Java Platform, Standard Edition 8 Names and Versions:

In JDK 8 and JRE 8, the version strings are 1.8 and 1.8.0

Why? Because the developers of Java chose to name the versions like this. I can only assume the real reasons, but I think it is, because naming it Java 8 implies that it is new and much better than Java 7 but keeping the version bump from 1.7 to 1.8 indicates that it is still version 1.x and therefore still backwards compatible. In the end it is marketing.

See also Why is Java version 1.X referred to as Java X?.

4

Before Java 9, Java version X was internally specified as 1.X according to these specs.

Then came JEP 223 which proposed to change the version to just X starting with Java 9.


It should be noted that different tools may even use other conventions. For instance in Gradle there is JavaVersion.VERSION_1_9, JavaVersion.VERSION_1_10 and they only switch to the new convention in JavaVersion.VERSION_11 (see their code comment).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy