How do I get Java Runtime Environment (JRE) version?

Category: java.lang, viewed: 4K time(s).
package org.kodejava.examples.lang;

public class JavaVersion {
    public static void main(String[] args) {
        //
        // You can get the version of Java Runtime Environment
        // running on your machine by reading the "java.version"
        // property value from the system.
        //
        String version = System.getProperty("java.version");
        
        //
        // Just show to the world your JRE version :)
        //
        System.out.println("JRE Version = " + version);
    }
}