Tuesday, 26 August 2014

Get the Installation directory of JRE

Use "java.home" property to get the installation directory of JRE.

public class GetProperty {
    public static void main(String args[]){
        System.out.println(System.getProperty("java.home"));
    }
}

Output
C:\Program Files (x86)\Java\jdk1.8.0_05\jre


                                                             Home

No comments:

Post a Comment