[Java] system. getproperty () System Parameters

Source: Internet
Author: User
Tags file separator

System. getproperty () System Parameters

 

Properties props = system. getproperties (); // system attributes <br/> system. out. println ("Java Runtime Environment version:" + props. getproperty ("Java. version "); <br/> system. out. println ("Java Runtime Environment vendor:" + props. getproperty ("Java. vendor "); <br/> system. out. println ("Java vendor URL:" + props. getproperty ("Java. vendor. URL "); <br/> system. out. println ("Java installation path:" + props. getproperty ("Java. home "); <br/> system. out. println ("Java Virtual Machine Specification Version:" + props. getproperty ("Java. VM. specification. version "); <br/> system. out. println ("Java virtual machine specification Supplier:" + props. getproperty ("Java. VM. specification. vendor "); <br/> system. out. println ("Java virtual machine specification name:" + props. getproperty ("Java. VM. specification. name "); <br/> system. out. println ("Java Virtual Machine implementation version:" + props. getproperty ("Java. VM. version "); <br/> system. out. println ("Java Virtual Machine implementation vendor:" + props. getproperty ("Java. VM. vendor "); <br/> system. out. println ("Java Virtual Machine implementation name:" + props. getproperty ("Java. VM. name "); <br/> system. out. println ("Java Runtime Environment Standard Version:" + props. getproperty ("Java. specification. version "); <br/> system. out. println ("Java Runtime Environment specification Supplier:" + props. getproperty ("Java. specification. vender "); <br/> system. out. println ("Java Runtime Environment specification name:" + props. getproperty ("Java. specification. name "); <br/> system. out. println ("Java class format version:" + props. getproperty ("Java. class. version "); <br/> system. out. println ("Java class path:" + props. getproperty ("Java. class. path "); <br/> system. out. println ("List of paths searched during Database loading:" + props. getproperty ("Java. library. path "); <br/> system. out. println ("Default temporary file path:" + props. getproperty ("Java. io. tmpdir "); <br/> system. out. println ("path of one or more extended directories:" + props. getproperty ("Java. ext. dirs "); <br/> system. out. println ("operating system name:" + props. getproperty ("OS. name "); <br/> system. out. println ("Operating System Architecture:" + props. getproperty ("OS. arch "); <br/> system. out. println ("OS version:" + props. getproperty ("OS. version "); <br/> system. out. println ("file separator:" + props. getproperty ("file. separator "); //"/"in UNIX System <br/> system. out. println ("path separator:" + props. getproperty ("path. separator "); //": "in UNIX systems <br/> system. out. println ("line separator:" + props. getproperty ("line. separator "); //"/n "in UNIX System <br/> system. out. println ("User Account name:" + props. getproperty ("user. name "); <br/> system. out. println ("Your home directory:" + props. getproperty ("user. home "); <br/> system. out. println ("current working directory of the User:" + props. getproperty ("user. dir "));Class getproperties {<br/> Public static void main (string [] ARGs) {<br/> JAVA. util. properties pp = system. getproperties (); <br/> enumeration <?> Names = pp. propertynames (); <br/> while (names. hasmoreelements () {<br/> system. out. println (names. nextelement (); <br/>}< br/>

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.