Method: system. getproperty (propertyname );
Propertyname can be the following values:
Java. runtime. Name: name of the Java Runtime Environment
Bin directory of sun. boot. Library. Path JRE
Java. VM. Version Java Virtual Machine version
Java. VM. Vendor Java virtual machine vendor
Java. Vendor. url Java vendor URL
Path. Separator of environment variables in Java
Java. VM. Name Java VM name
User. Country the country code of the current user, such as CN.
User. dir main directory of the current program
Line. Separator line Separator
OS. Name: the operating system name, such as Windows XP.
Propertyname can be the following values:
User. home can be used to obtain the Home Directory of the current user.
Java
. Specification. Version: Get the current JDK version.
Java
. Class. Path get classpath
User. Name: Get the current user name
Java
. Home get JDK path
Sun. OS. Patch. Level: Get the system version number. It can also be said that the patch number is displayed as Service Pack 2.
OS. Arch: displays the OS type as x86.
OS. Version: displays the system internal version.
Java
. Io. tmpdir displays the temporary directory of the current system