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
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
public class GetProperty { public static void main(String args[]){ System.out.println(System.getProperty("java.home")); } }
C:\Program Files (x86)\Java\jdk1.8.0_05\jre
No comments:
Post a Comment