Properties p = System.getProperties();
Enumeration keys = p.keys();
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
String value = (String)p.get(key);
System.out.println(key + " ***: " + value);
}
or if we want specific property
String classPath = System.getProperty("java.class.path",".");
System.out.println("classPath = " + classPath);
No comments:
Post a Comment