Java Related parameter acquisition

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 ("Virtual machine specification Provider for Java:" +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 vendor:" +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"));
}


Java Related parameter acquisition

Related Article

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.