The examples in this article summarize the Java System.getproperty () method to get the usage of the information. Share to everyone for your reference. Specifically as follows:
Copy Code code as follows:
System.out.println ("Java Version number:" + system.getproperty ("java.version")); Java Version number
SYSTEM.OUT.PRINTLN ("Java Provider name:" + system.getproperty ("Java.vendor")); Java Provider Name
SYSTEM.OUT.PRINTLN ("Java Provider website:" + system.getproperty ("Java.vendor.url")); Java Provider web site
System.out.println ("JRE directory:" + system.getproperty ("Java.home")); Java, oh, should be the JRE directory
SYSTEM.OUT.PRINTLN ("Java Virtual machine spec version number:" + system.getproperty ("java.vm.specification.version")); Java Virtual Machine Spec version number
SYSTEM.OUT.PRINTLN ("Java Virtual machine Specification provider:" + system.getproperty ("Java.vm.specification.vendor")); Java Virtual Machine specification provider
SYSTEM.OUT.PRINTLN ("Java Virtual machine Specification Name:" + system.getproperty ("Java.vm.specification.name")); Java Virtual Machine Specification name
SYSTEM.OUT.PRINTLN ("Java Virtual machine version number:" + system.getproperty ("java.vm.version")); Java Virtual Machine version number
SYSTEM.OUT.PRINTLN ("Java Virtual machine provider:" + system.getproperty ("Java.vm.vendor")); Java Virtual machine Provider
SYSTEM.OUT.PRINTLN ("Java Virtual machine Name:" + system.getproperty ("Java.vm.name")); Java Virtual machine Name
SYSTEM.OUT.PRINTLN ("Java Spec version number:" + system.getproperty ("java.specification.version")); Java Specification version number
SYSTEM.OUT.PRINTLN ("Java Spec provider:" + system.getproperty ("Java.specification.vendor")); Java specification Provider
System.out.println ("Java Canonical name:" + system.getproperty ("Java.specification.name")); Java Specification Name
System.out.println ("Java class version number:" + system.getproperty ("java.class.version")); Java class version number
System.out.println ("Java classpath:" + system.getproperty ("Java.class.path")); Java class path
System.out.println ("Java lib Path:" + system.getproperty ("Java.library.path")); Java Lib Path
SYSTEM.OUT.PRINTLN ("Java input and output temporary path:" + system.getproperty ("Java.io.tmpdir")); Java input and output temporary path
SYSTEM.OUT.PRINTLN ("Java compiler:" + system.getproperty ("Java.compiler")); java compiler
SYSTEM.OUT.PRINTLN ("Java Execution path:" + system.getproperty ("Java.ext.dirs")); Java Execution Path
SYSTEM.OUT.PRINTLN ("Operating system name:" + system.getproperty ("Os.name")); Operating system name
SYSTEM.OUT.PRINTLN ("Architecture of the Operating system:" + system.getproperty ("Os.arch")); The architecture of the operating system
SYSTEM.OUT.PRINTLN ("Operating system version number:" + system.getproperty ("os.version")); Operating system version number
System.out.println ("File separator:" + system.getproperty ("File.separator")); File separator
SYSTEM.OUT.PRINTLN ("Path separator:" + system.getproperty ("Path.separator")); Path separator
System.out.println ("line separator:" + system.getproperty ("Line.separator")); Line Separator
SYSTEM.OUT.PRINTLN ("Operating system User name:" + system.getproperty ("User.Name")); User name
System.out.println ("The home directory of the operating system User:" + system.getproperty ("User.home")); User's home directory
SYSTEM.OUT.PRINTLN ("Current program directory:" + system.getproperty ("User.dir")); directory where the current program resides
I hope this article will help you with your Java programming.