Quantcast
Channel: Supreme Debugging
Viewing all articles
Browse latest Browse all 13

How to find which flavor and which version of JDK do I have on my Ubuntu

$
0
0

Command to find the file containing the jdk information

Command:

file `which java javac`

Output:


~/ $ file `which java javac`
/usr/bin/java:  symbolic link to `/etc/alternatives/java'
/usr/bin/javac: symbolic link to `/etc/alternatives/javac'


Command to find the jdk version information

Command and Output


~/ $ file /etc/alternatives/java /etc/alternatives/javac
/etc/alternatives/java:  symbolic link to `/usr/lib/jvm/java-8-oracle/jre/bin/java'
/etc/alternatives/javac: symbolic link to `/usr/lib/jvm/java-8-oracle/bin/javac'
~/ $

Now, you are having Java/JDK version 8 of oracle.


Viewing all articles
Browse latest Browse all 13

Trending Articles