Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 an OpenJDK or OracleJDK ?

like image 271
Abhishek Singh Avatar asked Nov 24 '15 13:11

Abhishek Singh


People also ask

How do I know if I have Oracle Java installed?

Going to a command line and typing java -version can tell us for sure if Java is installed.

How do I know if OpenJDK is installed on Windows?

Verify Java If nothing comes up, please install the latest Java version from OpenJDK. Alternatively, open a command prompt window (press Win⊞ + R, type cmd, and hit Enter) and enter the command: java -version . This will output the version of Java installed on your computer.


2 Answers

I think that you're using OracleJDK.

As I saw with a google search, the openJDK --version output is like this:

java -version

openjdk version "1.8.0-internal"

OpenJDK Runtime Environment (build 1.8.0-internal-0)

OpenJDK 64-Bit Zero VM (build 25.0-b20-internal, interpreted mode)

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

like image 111
JFPicard Avatar answered Oct 15 '22 03:10

JFPicard


On 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 the 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 assume, the string "java" at the beginning denotes Oracle Java, whereas the OpenJDK gets you "openjdk".

like image 21
Sascha K Avatar answered Oct 15 '22 03:10

Sascha K