I'm on Ubuntu 16.04 and need to install java version 8 (or 9).

I did: sudo apt-get install openjdk-8-jdk

But when I check current version using java -version, the result is:

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

What am I doing wrong?

  • 4
    That's version 8 what were you expecting? Java 9 would be 1.9.0_xxx, your in order! – George Udosen Aug 23 '18 at 22:48
  • I thought this is 1.8 version... I expected something like: openjdk version "8.xx.xx" – OTAR Aug 23 '18 at 22:51
  • 1
    @GeorgeUdosen - I didn't knew that, Thank You – OTAR Aug 23 '18 at 22:54
  • Nobody talk about the Solaris/SunOS version naming pattern. – user459652 Dec 14 '18 at 22:29

You have installed OpenJDK correctly. Java 8 and Java 1.8 are one and the same thing. It is just a naming convention as explained in this post on Quora.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.