Checking which version of Java is installed

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I just came across a handy way of checking the version of Java that’s installed on a computer. Try typing:

java -version

This seems to work for me on Windows, MacOS and Linux, regardless of the Java vendor (i.e. my RHEL5 box has a GNU version of Java rather than Sun Java, although I’m not sure what happens for the Microsoft Java VM). Of course, if the command is not found, that probably means that you don’t have Java installed (or at least not on your path).

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.