java之Junit测试代码
@org.junit.Test
public void printSystemPropertiesToConsole() {
Set<Entry<Object, Object>> entrySet = System.getProperties().entrySet();
Iterator<Entry<Object, Object>> iterator = entrySet.iterator();
while( iterator.hasNext() ){
System.err.println(iterator.next().toString());
}
}
结果:
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Program Files\Java\jdk1.6.0_10\jre\bin
java.vm.version=11.0-b15
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
sun.java.launcher=SUN_STANDARD
user.country=CN
sun.os.patch.level=Service Pack 3
java.vm.specification.name=Java Virtual Machine Specification
user.dir=D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy
java.runtime.version=1.6.0_10-b33
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files\Java\jdk1.6.0_10\jre\lib\endorsed
os.arch=x86
java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
line.separator=
java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows XP
sun.jnu.encoding=GBK
java.library.path=C:\Program Files\Java\jdk1.6.0_10\jre\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/programfiles/myeclipse/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin/client;C:/programfiles/myeclipse/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin;D:\programfiles\oracle11g\adminstrator\product\11.2.0\dbhome_1\bin;C:\Program Files\AMD APP\bin\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\programfiles\mysql5.1.30\bin;C:\programfiles\svn\bin;C:\programfiles\tortoiseSVN\bin;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Rational\common;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\WPS Office\9.1.0.4468\office6;,;D:\programfiles\Java\jdk1.7.0_02\bin;C:\programfiles\hadoop4win\bin;C:\Program Files\CVSNT\;D:\programfiles\grails-2.2.1\bin;C:\Oracle\instantclient_11_2
java.specification.name=Java Platform API Specification
java.class.version=50.0
sun.management.compiler=HotSpot Client Compiler
os.version=5.1
user.home=C:\Documents and Settings\Administrator
user.timezone=
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=gbk
java.specification.version=1.6
java.class.path=D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\classes;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\mysql-connector-java-5.0.8-bin.jar;C:\programfiles\myeclipse\Common\plugins\org.junit4_4.5.0.v20090824\junit.jar;C:\programfiles\myeclipse\Common\plugins\org.hamcrest.core_1.1.0.v20090501071000.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\antlr-2.7.6.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\asm-3.3.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\asm-commons-3.3.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\asm-tree-3.3.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\c3p0-0.9.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\com.springsource.net.sf.cglib-2.2.0.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\com.springsource.org.aopalliance-1.0.0.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\com.springsource.org.apache.commons.logging-1.1.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\com.springsource.org.aspectj.tools-1.6.6.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\commons-collections-3.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\commons-lang-2.5.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\cxf-2.7.8.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\dom4j-1.6.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\freemarker-2.3.18.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\hibernate3.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\javassist-3.11.0.GA.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\jdom.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\jta-1.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\log4j.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\neethi-3.0.2.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\ognl-3.0.4.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.aop-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.asm-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.aspects-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.beans-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.context-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.context.support-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.core-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.expression-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.jdbc-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.orm-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.transaction-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\org.springframework.web-3.1.0.RELEASE.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\slf4j-api-1.5.8.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\slf4j-log4j12.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\stax2-api-3.1.1.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\woodstox-core-asl-4.2.0.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\wsdl4j-1.6.3.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\xmlschema-core-2.0.3.jar;D:\ProBag\ChuanZhiRuanjian\MyEclipese10\projects\trafficIllegalPunishProxy\WebRoot\WEB-INF\lib\jaxen-1.1-beta-6.jar;/C:/programfiles/myeclipse/configuration/org.eclipse.osgi/bundles/642/1/.cp/;/C:/programfiles/myeclipse/configuration/org.eclipse.osgi/bundles/640/1/.cp/;/C:/programfiles/myeclipse/configuration/org.eclipse.osgi/bundles/641/1/.cp/
user.name=Administrator
java.vm.specification.version=1.0
java.home=C:\Program Files\Java\jdk1.6.0_10\jre
sun.arch.data.model=32
user.language=zh
java.specification.vendor=Sun Microsystems Inc.
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode, sharing
java.version=1.6.0_10
java.ext.dirs=C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path=C:\Program Files\Java\jdk1.6.0_10\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_10\jre\classes;C:\programfiles\myeclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.5.0.me201003231033\data\libraryset\EE_5\javaee.jar;C:\programfiles\myeclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.5.0.me201003231033\data\libraryset\EE_5\jsf-impl.jar;C:\programfiles\myeclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.5.0.me201003231033\data\libraryset\EE_5\jsf-api.jar;C:\programfiles\myeclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.5.0.me201003231033\data\libraryset\EE_5\jstl-1.2.jar
java.vendor=Sun Microsystems Inc.
file.separator=\
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding=UnicodeLittle
sun.cpu.endian=little
sun.desktop=windows
sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
常用系统参数:
path.separator=;
file.separator=\
file.encoding=gbk
line.separator=
java.vm.info=mixed mode, sharing
java.version=1.6.0_10
java.ext.dirs=C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
user.country=CN