How to tell which version of java is running in linux (Ubuntu)
Command line
To find out which version of java is installed, type
java -version
in a terminal window. This will give something like this:
java version “1.5.0”
gij (GNU libgcj) version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Browser
You can also visit www.java.com’s Verify Java Version page. On this page, there is a pleasingly big red button that you can click which will tell you what version of java is installed.
Pressing the pleasingly big red button will tell you something like this:
Your Java version is 1.5.0_22
Of course, if one isn’t running the latest and greatest version, this page tells you to install the most up-to-date version, but I usually prefer to wait until there is an official Ubuntu update.