Get the currently installed Java version and vendor on Ubuntu / Debian Linux

Today I had to  figure out the Java version installed on my machine while digging through some problems with my IntelliJ IDE. This is how you can get the currently installed Java version and vendor on Ubuntu or other Debian derivatives on bash.

$> sysinfo

That gives you something like that:

Java Version:    1.8.0_131
Java Vendor:     Oracle Corporation
Java home:       /usr/lib/jvm/java-8-oracle/jre
Java classpath:  /usr/lib/jvm/java-8-oracle/db/lib/derby.jar:/usr/lib/jvm/java-8-oracle/db/lib/derbynet.jar:/usr/lib/jvm/java-8-oracle/db/lib/derbytools.jar:/usr/lib/jvm/java-8-oracle/db/lib/derbyoptionaltools.jar:/usr/lib/jvm/java-8-oracle/db/lib/derbyclient.jar
OS name:         Linux
OS architecture: amd64
OS version:      4.15.0-20-generic
Java user name:  bravehartk2
Java user home:  /home/bravehartk2
Java user dir:   /home/bravehartk2
java.specification.name: Java Platform API Specification
java.specification.version: 1.8
java.runtime.version: 1.8.0_131-b11
--------- Derby Information --------
[/usr/lib/jvm/java-8-oracle/db/lib/derby.jar] 10.11.1.2 - (1629631)
[/usr/lib/jvm/java-8-oracle/db/lib/derbytools.jar] 10.11.1.2 - (1629631)
[/usr/lib/jvm/java-8-oracle/db/lib/derbynet.jar] 10.11.1.2 - (1629631)
[/usr/lib/jvm/java-8-oracle/db/lib/derbyclient.jar] 10.11.1.2 - (1629631)
[/usr/lib/jvm/java-8-oracle/db/lib/derbyoptionaltools.jar] 10.11.1.2 - (1629631)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale :  [English/United Kingdom [en_GB]]
Found support for locale: [cs]
     version: 10.11.1.2 - (1629631)
Found support for locale: [de_DE]
     version: 10.11.1.2 - (1629631)
Found support for locale: [es]
     version: 10.11.1.2 - (1629631)
Found support for locale: [fr]
     version: 10.11.1.2 - (1629631)
Found support for locale: [hu]
     version: 10.11.1.2 - (1629631)
Found support for locale: [it]
     version: 10.11.1.2 - (1629631)
Found support for locale: [ja_JP]
     version: 10.11.1.2 - (1629631)
Found support for locale: [ko_KR]
     version: 10.11.1.2 - (1629631)
Found support for locale: [pl]
     version: 10.11.1.2 - (1629631)
Found support for locale: [pt_BR]
     version: 10.11.1.2 - (1629631)
Found support for locale: [ru]
     version: 10.11.1.2 - (1629631)
Found support for locale: [zh_CN]
     version: 10.11.1.2 - (1629631)
Found support for locale: [zh_TW]
     version: 10.11.1.2 - (1629631)
------------------------------------------------------

As you can see, you’ll get the currently installed Java version and vendor this way. Additionally you get the installation path (Java home).

By the way, this command also gives you the supported locales of your system.

For further infomation see: http://man7.org/linux/man-pages/man2/sysinfo.2.html

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.