java_geek java_geek - 1 year ago 71
Java Question

How to find the JVM version from a program?

I want to write a sample Java file in which I want to know the JVM version in which the class is running. Is there a way?

Answer Source

System.getProperty("java.version") returns what you need.

You can also use JMX if you want:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download