Know details about the JAVA at run-time (this howto is deprecated)Tag(s): DEPRECATED
Applets can read certain system properties by invoking System.getProperty(String key)
java.version Java version number java.vendor Java vendor-specific string java.vendor.url Java vendor URL os.name Operating system name os.arch Operating system architecture file.separator File separator (eg, "/") path.separator Path separator (eg, ":") line.separator Line separator java.class.version Java class version number
java.home Java installation directory java.class.path Java classpath user.name User account name user.home User home directory user.dir User's current working directory
String s = System.getProperty("java.vendor");
public String dump() { StringBuffer sb = new StringBuffer(); Runtime rt = Runtime.getRuntime(); long freeMemory = rt.freeMemory(); long totalMemory = rt.totalMemory(); sb.append("free memory=" + freeMemory); sb.append("\n"); sb.append("total memory=" + totalMemory); sb.append("\n"); java.util.Properties p = null; try { p = System.getProperties(); } catch(Exception e) { e.printStackTrace(); return ""; } java.util.Enumeration en = p.propertyNames(); while (en.hasMoreElements()){ String s = (String) en.nextElement(); String strValue= p.getProperty(s); sb.append(s + "=<" + strValue + ">"); sb.append("\n"); } // result to a string return sb.toString(); }