How do I know if I am using Open JDK or Oracle JDK?

Using java -version gives me this.

java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) 

Is it OpenJDK or OracleJDK?

+5
source share
2 answers

I think you are using OracleJDK.

As I saw with google search, the output of openJDK --version looks like this:

java -version

openjdk version "1.8.0-internal"

OpenJDK workspace (build 1.8.0-internal-0)

OpenJDK 64-bit Zero VM (built-in, interpreted mode 25.0-b20)

See: http://mail.openjdk.java.net/pipermail/jdk8-dev/2013-July/002840.html

+5
source

In debian, jessie-backports, openjdk-8:

 openjdk version "1.8.0_66-internal" OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode) 

Using ubuntu ppa for oracle-java-8:

 java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) 

I would suggest that the string β€œjava” at the beginning stands for Oracle Java, whereas OpenJDK gets you β€œopenjdk”.

+1
source

Source: https://habr.com/ru/post/1236709/


All Articles