Check Java version from Command Line

Gabriel Turqos

Active Member
Joined
Mar 11, 2019
I have a Java installation and I have only access via bash. How can I check the Java version from command line.
 
To know whether you're running Java 5, 6 or 7, firstly type java -version.

There will be a line in your output that looks similar to this: java version "1.7.0_55"

Then you use this table for converting the 'jargon' result to the version number.

1.7.0_55 is Java 7
1.6.0_75 is Java 6
1.5.0_65 is Java 5
 
Back
Top Bottom