List of usage examples for org.apache.commons.lang SystemUtils JAVA_VM_INFO
String JAVA_VM_INFO
To view the source code for org.apache.commons.lang SystemUtils JAVA_VM_INFO.
Click Source Link
The java.vm.info
System Property.
From source file:com.yahoo.flowetl.commons.runner.Main.java
/** * Gets some useful runtime info as a map of names -> info. *///from w ww . j a v a2 s .co m private static Map<String, Object> getRuntimeInfo() { Map<String, Object> sysInfo = new TreeMap<String, Object>(); StringBuilder jvminfo = new StringBuilder(); jvminfo.append("Vendor: "); jvminfo.append(SystemUtils.JAVA_VENDOR); jvminfo.append(", Version: "); jvminfo.append(SystemUtils.JAVA_VERSION + " - " + SystemUtils.JAVA_VM_INFO); jvminfo.append(", OS: "); jvminfo.append(SystemUtils.OS_NAME + " (" + SystemUtils.OS_VERSION + " : " + SystemUtils.OS_ARCH + ")"); sysInfo.put(WordUtils.capitalizeFully("jvm"), jvminfo.toString()); sysInfo.put(WordUtils.capitalizeFully("default charset encoding"), DEF_CHAR_SET.name()); String netAdd = NetUtils.getLocalAddress(); if (StringUtils.isEmpty(netAdd)) { netAdd = "????"; } String localName = NetUtils.getLocalHostName(); if (StringUtils.isEmpty(localName)) { localName = "????"; } sysInfo.put(WordUtils.capitalizeFully("network"), localName + " at ip address " + netAdd); String cPath = SystemUtils.JAVA_CLASS_PATH; String linesep = StringEscapeUtils.escapeJava(SystemUtils.LINE_SEPARATOR); sysInfo.put(WordUtils.capitalizeFully("classpath"), cPath); sysInfo.put(WordUtils.capitalizeFully("jvm home"), SystemUtils.JAVA_HOME); sysInfo.put(WordUtils.capitalizeFully("jvm tmpdir"), SystemUtils.JAVA_IO_TMPDIR); sysInfo.put(WordUtils.capitalizeFully("jvm libpath"), SystemUtils.JAVA_LIBRARY_PATH); sysInfo.put(WordUtils.capitalizeFully("line separator"), linesep); sysInfo.put(WordUtils.capitalizeFully("path separator"), StringEscapeUtils.escapeJava(SystemUtils.PATH_SEPARATOR)); sysInfo.put(WordUtils.capitalizeFully("user timezone"), SystemUtils.USER_TIMEZONE); sysInfo.put(WordUtils.capitalizeFully("user home"), SystemUtils.USER_HOME); sysInfo.put(WordUtils.capitalizeFully("user language"), SystemUtils.USER_LANGUAGE); sysInfo.put(WordUtils.capitalizeFully("user name"), SystemUtils.USER_NAME); return sysInfo; }