Skip to content
Advertisement

Correct way to check Java version from BASH script

How can I check whether Java is available (in the PATH or via JAVA_HOME) from a bash script and make sure the version is at least 1.5?

Advertisement

Answer

Perhaps something like:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement