What is the reason I see OpenJDK 1.8 instead of Java 8, and how are these versions related?

When I run java -version, it shows something like:

openjdk version "1.8.0"

I was expecting it to show Java 8. What’s the difference here, and how does Java 8 vs 1.8 actually work in terms of versioning and naming?

Java 8 and Java 1.8 are actually the same thing.

Yep, you read that right. When you see:

openjdk version "1.8.0_XXX"

That is Java 8. The versioning scheme just used to follow the 1.x format for a long time. So:

Java 5 = 1.5

Java 6 = 1.6

Java 7 = 1.7

Java 8 = 1.8

After Java 8, Oracle and the OpenJDK community decided to simplify and drop the “1.”, so Java 9 and onward are just 9, 10, 11, and so on.

Still confused? Try checking javac -version or full release info

If you want to confirm what version you’re running beyond the 1.8 label, you can also run:

javac -version

Or check the full details by running:

java -XshowSettings:properties -version

This shows more config details and helps you confirm it’s really Java 8.