Thursday, February 21, 2013

Read installed java version

To get system property of installed java version, call System.getProperty("java.version").

Example:

package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {
        String javaVersion = System.getProperty("java.version");
        System.out.println("java.version: " + javaVersion);
    }
}


Read installed java version
Read installed java version


No comments:

Post a Comment