System.getproperties (). List (System.out);
If you want to get a property, such as a common "operating system"
Then System.getproperty ("Os.name");
The output is as follows
Java.runtime.name=java (TM) SE runtime Environment,
Sun.boot.library.path=c:\program Files (x86) \java\jre7\bin,
JAVA.VM.VERSION=24.80-B11,
Java.vm.vendor=oracle Corporation,
java.vendor.url=http://java.oracle.com/,
path.separator=;,
Java.vm.name=java HotSpot (TM) Client VM,
File.encoding.pkg=sun.io,
USER.COUNTRY=CN,
User.script=,
Sun.java.launcher=sun_standard,
Sun.os.patch.level=service Pack 1,
Java.vm.specification.name=java Virtual Machine Specification,
User.dir=f:\workspace\workspace_venus\virtualdesktoptest,
JAVA.RUNTIME.VERSION=1.7.0_80-B15,
Java.awt.graphicsenv=sun.awt.win32graphicsenvironment,
Java.endorsed.dirs=c:\program Files (x86) \java\jre7\lib\endorsed,
Os.arch=x86,
Java.io.tmpdir=c:\users\admini~1\appdata\local\temp\,
Line.separator=
,
Java.vm.specification.vendor=oracle Corporation,
User.variant=,
Os.name=windows 7,
SUN.JNU.ENCODING=GBK,
Java.library.path=c:\program Files (x86) \java\jre7\bin; C:\Windows\Sun\Java\bin; C:\Windows\system32; C:\Windows; C:/Program Files (x86)/java/jre7/bin/client; C:/Program Files (x86)/java/jre7/bin; C:/Program Files (x86)/java/jre7/lib/i386; C:\Users\Administrator\teller\device; E:\installOracle\product\11.2.0\client_1; E:\installOracle\product\11.2.0\dbhome_1\bin; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\;.; C:\Program Files (x86) \java\jdk1.6.0_45\bin;.; C:\Program Files (x86) \java\jdk1.6.0_45\jre\bin; C:\Program Files (x86) \maven\apache-maven-3.2.5; C:\Program Files (x86) \maven\apache-maven-3.2.5\bin; E:\Program FILES\VISUALSVN Server\Bin; E:\Program Files\tortoisesvn\bin; E:\Program files\nodejs\; F:\PLATFORM\ant\bin; C:\USERS\ADMINISTRATOR\APPDATA\ROAMING\NPM; F:\eclipse\eclipse3.7;;.,
Java.specification.name=java Platform API Specification,
java.class.version=51.0,
Sun.management.compiler=hotspot Client Compiler,
os.version=6.1,
User.home=c:\users\administrator,
User.timezone=,
Java.awt.printerjob=sun.awt.windows.wprinterjob,
File.encoding=utf-8,
java.specification.version=1.7,
Java.class.path=f:\workspace\workspace_venus\virtualdesktoptest\bin,
User.name=administrator,
java.vm.specification.version=1.7,
Sun.java.command=com.zs.systemproperty,
Java.home=c:\program Files (x86) \java\jre7,
SUN.ARCH.DATA.MODEL=32,
User.language=zh,
Java.specification.vendor=oracle Corporation,
Awt.toolkit=sun.awt.windows.wtoolkit,
java.vm.info=mixed mode,
JAVA.VERSION=1.7.0_80,
Java.ext.dirs=c:\program Files (x86) \java\jre7\lib\ext; C:\Windows\Sun\Java\lib\ext,
Sun.boot.class.path=c:\program Files (x86) \java\jre7\lib\resources.jar; C:\Program Files (x86) \java\jre7\lib\rt.jar; C:\Program Files (x86) \java\jre7\lib\sunrsasign.jar; C:\Program Files (x86) \java\jre7\lib\jsse.jar; C:\Program Files (x86) \java\jre7\lib\jce.jar; C:\Program Files (x86) \java\jre7\lib\charsets.jar; C:\Program Files (x86) \java\jre7\lib\jfr.jar; C:\Program Files (x86) \java\jre7\classes,
Java.vendor=oracle Corporation,
File.separator=\,
java.vendor.url.bug=http://bugreport.sun.com/bugreport/,
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
Getting the Java program startup environment properties