Java-Get Java Property

Get Java Property

The System.getProperty( ) method is used to you can obtain the values of various environment variables. The following properties use to find Java property :

java.home Identifies the Installation directory for Java Runtime Environment.
java.vm.name Identifies the JVM implementation.
java.vm.version Identifies the JVM implementation version.
java.vm.version Identifies the version of the JVM specification on which the JRockit JVM instance is based.
java.vm.specification.name Identifies the name of the specification on which the JRockit JVM instance is based.

Program

0 (1) - Copy - Copy

Program Source

public class Javaapp {

    public static void main(String[] args) {
       
        System.out.println(System.getProperty("java.home"));
        System.out.println(System.getProperty("java.vm.version"));
        System.out.println(System.getProperty("java.vm.name"));
        System.out.println(System.getProperty("java.vm.specification.name"));
        System.out.println(System.getProperty("java.specification.version"));
    }
}

Leave a Comment