JAVA提取系统相关属性

 
Properties prs = System.getProperties();
		Set<Object> kes = prs.keySet();
		for (Iterator<Object> iterator = kes.iterator(); iterator.hasNext();) {
			Object object = (Object) iterator.next();
			System.out.println(object+"-->"+prs.getProperty(object.toString()));
		}
		System.out.println(System.getProperty("file.separator"));


整理一下,便于后期查阅

java.runtime.name-->Java(TM) SE Runtime Environment
sun.boot.library.path-->C:\Program Files\Java\jdk1.6.0_24\jre\bin
java.vm.version-->19.1-b02
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:\Workspace2011\Coll
java.runtime.version-->1.6.0_24-b07
java.awt.graphicsenv-->sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs-->C:\Program Files\Java\jdk1.6.0_24\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_24\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.6.0_24\bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;D:\Program Files\IDM Computer Solutions\UltraEdit\
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:\aiflowWorkspace2011\LogAna_Coll\bin
user.name-->Administrator
java.vm.specification.version-->1.0
java.home-->C:\Program Files\Java\jdk1.6.0_24\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_24
java.ext.dirs-->C:\Program Files\Java\jdk1.6.0_24\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path-->C:\Program Files\Java\jdk1.6.0_24\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_24\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_24\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_24\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_24\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_24\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_24\jre\lib\modules\jdk.boot.jar;C:\Program Files\Java\jdk1.6.0_24\jre\classes
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


 

你可能感兴趣的:(JAVA提取系统相关属性)