Why Do I See Open Jdk 1.8 Instead of Java 8?

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

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

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest