Java Learning (20): Getting system parameters

Source: Internet
Author: User

public static void Main (string[] args)
{
Properties props = System.getproperties (); System Properties
SYSTEM.OUT.PRINTLN ("Running environment version of Java:" + props.getproperty ("java.version"));
SYSTEM.OUT.PRINTLN ("Running environment provider for Java:" + props.getproperty ("Java.vendor"));
System.out.println ("Java Vendor URL:" + props.getproperty ("Java.vendor.url"));
SYSTEM.OUT.PRINTLN ("Installation path for Java:" + props.getproperty ("Java.home"));
System.out.println ("Java version of the virtual machine specification:" + props.getproperty ("java.vm.specification.version"));
SYSTEM.OUT.PRINTLN ("Java specification Provider for virtual machines:" + props.getproperty ("Java.vm.specification.vendor"));
SYSTEM.OUT.PRINTLN ("Java Virtual machine Specification Name:" + props.getproperty ("Java.vm.specification.name"));
SYSTEM.OUT.PRINTLN ("Virtual machine implementation version of Java:" + props.getproperty ("java.vm.version"));
SYSTEM.OUT.PRINTLN ("Java Virtual machine Implementation provider:" + props.getproperty ("Java.vm.vendor"));
SYSTEM.OUT.PRINTLN ("Java Virtual machine Implementation name:" + props.getproperty ("Java.vm.name"));
System.out.println ("Java Runtime Environment Specification version:" + Props.getproperty ("java.specification.version"));
System.out.println ("Java Runtime Environment Specification provider:" + props.getproperty ("Java.specification.vender"));
System.out.println ("Java Runtime Environment Specification name:" + props.getproperty ("Java.specification.name"));
System.out.println ("Java Class format version number:" + props.getproperty ("java.class.version"));
System.out.println ("Java classpath:" + props.getproperty ("Java.class.path"));
SYSTEM.OUT.PRINTLN ("List of paths searched when loading library:" + props.getproperty ("Java.library.path"));
SYSTEM.OUT.PRINTLN ("Default temporary file path:" + props.getproperty ("Java.io.tmpdir"));
SYSTEM.OUT.PRINTLN ("Path to one or more extended directories:" + props.getproperty ("Java.ext.dirs"));
System.out.println ("Name of the operating system:" + props.getproperty ("Os.name"));
SYSTEM.OUT.PRINTLN ("Architecture of the Operating system:" + props.getproperty ("Os.arch"));
SYSTEM.OUT.PRINTLN ("OS version:" + Props.getproperty ("os.version"));
System.out.println ("File delimiter:" + props.getproperty ("File.separator")); In UNIX systems is "/"
SYSTEM.OUT.PRINTLN ("Path delimiter:" + props.getproperty ("Path.separator")); In a Unix system is ":"
System.out.println ("line delimiter:" + props.getproperty ("Line.separator")); In UNIX systems is "/n"
System.out.println ("User's account name:" + props.getproperty ("User.Name"));
System.out.println ("User's home directory:" + props.getproperty ("User.home"));
System.out.println ("User's current working directory:" + props.getproperty ("User.dir"));
}

Console:
Java Operating Environment version: 1.8.0_60
Operating environment provider for Java: Oracle Corporation
Java Vendor's url:http://java.oracle.com/
Installation path for Java: C:\Program files\java\jre1.8.0_60
Java Virtual Machine Specification version: 1.8
Virtual machine specification Provider for Java: Oracle Corporation
Java VM Specification Name: Java Virtual Machine specification
Java Virtual Machine Implementation version: 25.60-b23
Java Virtual machine implementation provider: Oracle Corporation
Java Virtual Machine Implementation name: Java HotSpot (TM) 64-bit Server VM
Java Runtime Environment Specification version: 1.8
Java Runtime Environment specification vendor: null
Java Runtime Environment Specification name: Java Platform API specification
Java class format version number: 52.0
Classpath for Java: D:\Eclipse\WorkSpace\HelloWorld\bin
List of paths searched when loading library: C:\Program Files\java\jre1.8.0_60\bin; C:\Windows\Sun\Java\bin; C:\Windows\system32; C:\Windows; C:/Program Files/java/jre1.8.0_60/bin/server; C:/Program Files/java/jre1.8.0_60/bin; C:/Program Files/java/jre1.8.0_60/lib/amd64; C:\ProgramData\Oracle\Java\javapath; C:\Program Files (x86) \intel\icls client\; C:\Program Files\intel\icls client\; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files\intel\intel (R) Management Engine components\dal; C:\Program Files\intel\intel (R) Management Engine components\ipt; C:\Program Files (x86) \intel\intel (R) Management Engine components\dal; C:\Program Files (x86) \intel\intel (R) Management Engine components\ipt; C:\Program Files (x86) \common Files\lenovo\easyplussdk\bin; C:\Program Files\java\jdk1.8.0_60\bin; C:\Program files\java\jre1.8.0_60\bin;;D: \ Oracle\instant Client\Bin; C:\Windows\system32\config\systemprofile\.dnx\bin; C:\Program Files\Microsoft Dnx\dnvm\; C:\Users\LiuJF\Desktop;;.
Default temporary file path: C:\Users\LiuJF\AppData\Local\Temp\
Path to one or more extended directories: C:\Program Files\java\jre1.8.0_60\lib\ext; C:\Windows\Sun\Java\lib\ext
Name of the operating system: Windows 7
Architecture of the operating system: AMD64
Version of operating system: 6.1
File delimiter: \
Path delimiter:;
Line delimiter:

User's account name: LIUJF
User's home directory: C:\Users\LiuJF
User's current working directory: D:\Eclipse\WorkSpace\HelloWorld

Java Learning (20): Getting system parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.