Java Basics System.getproperty () method

Source: Internet
Author: User
Tags cas

Java Foundation System.getproperty () method Daquan

1  Public Static voidMain (string[] args) {2System.out.println ("Java Version number:" + system.getproperty ("java.version"));//Java version number3SYSTEM.OUT.PRINTLN ("Java Provider name:" + system.getproperty ("Java.vendor"));//Java provider name4SYSTEM.OUT.PRINTLN ("Java Provider website:" + system.getproperty ("Java.vendor.url"));//Java Provider Web site5System.out.println ("JRE directory:" + system.getproperty ("Java.home"));//Java, oh, it should be the JRE directory6SYSTEM.OUT.PRINTLN ("Java Virtual Machine Specification version number:" + system.getproperty ("java.vm.specification.version"));//Java Virtual Machine Specification version number7SYSTEM.OUT.PRINTLN ("Java Virtual machine Specification provider:" + system.getproperty ("Java.vm.specification.vendor"));//Java Virtual machine specification provider8SYSTEM.OUT.PRINTLN ("Java Virtual machine Specification Name:" + system.getproperty ("Java.vm.specification.name"));//Java Virtual machine Specification name9SYSTEM.OUT.PRINTLN ("Java Virtual machine version number:" + system.getproperty ("java.vm.version"));//Java Virtual machine version numberTenSYSTEM.OUT.PRINTLN ("Java Virtual machine provider:" + system.getproperty ("Java.vm.vendor"));//Java Virtual machine provider OneSYSTEM.OUT.PRINTLN ("Java Virtual machine Name:" + system.getproperty ("Java.vm.name"));//Java Virtual machine name ASYSTEM.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 Specification Name:" + system.getproperty ("Java.specification.name"));//Java Specification name theSystem.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/Output temp path:" + system.getproperty ("Java.io.tmpdir"));//java input/Output temp 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 ASYSTEM.OUT.PRINTLN ("Architecture of the Operating system:" + system.getproperty ("Os.arch"));//architecture of the operating system atSYSTEM.OUT.PRINTLN ("OS version number:" + system.getproperty ("os.version"));//operating system version number -System.out.println ("File delimiter:" + system.getproperty ("File.separator"));//file delimiter -SYSTEM.OUT.PRINTLN ("Path delimiter:" + system.getproperty ("Path.separator"));//Path delimiter -System.out.println ("line delimiter:" + system.getproperty ("Line.separator"));//Line delimiter -SYSTEM.OUT.PRINTLN ("Operating system User name:" + system.getproperty ("User.Name"));//User name -SYSTEM.OUT.PRINTLN ("Operating system user's home directory:" + system.getproperty ("User.home"));//User's home directory inSYSTEM.OUT.PRINTLN ("Current program directory:" + system.getproperty ("User.dir"));//directory where the current program is located -}

The output is:

1Java Version number: 1.7. 0_712 Java provider name: Oracle Corporation3Java Provider Web site: http://java.oracle.com/4JRE Directory: C:\Program files\java\jdk1.7. 0_71\jre5Java Virtual Machine Specification version number: 1.76 Java Virtual machine specification provider: Oracle Corporation7 Java VM Specification Name: Java Virtual Machine Specification8Java Virtual Machine version number: 24.71-B019 Java Virtual machine provider: Oracle CorporationTenJava Virtual machine Name: Java HotSpot (TM) 64-Bit Server VM OneJava Specification version number: 1.7 A java Specification providers: Oracle Corporation - Java Specification Name: Java Platform API specification -Java class version number: 51.0 the Java classpath: d:\mywork\cocopay\manager\target\classes;d:\mywork\cocopay\commons\target\classes;d:\soft\ Localrepository\org\apache\logging\log4j\log4j-core\2.0.1\log4j-core-2.0.1.jar;d:\soft\localrepository\org\ apache\logging\log4j\log4j-1.2-api\2.0.1\log4j-1.2-api-2.0.1.jar;d:\soft\localrepository\org\apache\logging\ Log4j\log4j-slf4j-impl\2.0.1\log4j-slf4j-impl-2.0.1.jar;d:\mywork\cocopay\security\target\classes;d:\soft\ Localrepository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;d:\mywork\cocopay\mm-api\target\ Classes;d:\soft\localrepository\org\jibx\jibx-bind\1.2.5\jibx-bind-1.2.5.jar;d:\soft\localrepository\bcel\bcel \5.1\bcel-5.1.jar;d:\soft\localrepository\regexp\regexp\1.2\regexp-1.2.jar;d:\soft\localrepository\log4j\log4j \1.2.17\log4j-1.2.17.jar;d:\soft\localrepository\com\thoughtworks\qdox\qdox\1.12.1\qdox-1.12.1.jar;d:\soft\ Localrepository\org\jibx\jibx-tools\1.2.5\jibx-tools-1.2.5.jar;d:\soft\localrepository\org\jibx\config\ 3rdparty\org\eclipse\org.eclipse.core.contEnttype\3.4.100.v20110423-0524\org.eclipse.core.contenttype-3.4.100.v20110423-0524.jar;d:\soft\localrepository \org\jibx\config\3rdparty\org\eclipse\org.eclipse.core.jobs\3.5.100.v20110404\ Org.eclipse.core.jobs-3.5.100.v20110404.jar;d:\soft\localrepository\org\jibx\config\3rdparty\org\eclipse\ Org.eclipse.core.resources\3.7.100.v20110510-0712\org.eclipse.core.resources-3.7.100.v20110510-0712.jar;d:\ Soft\localrepository\org\jibx\config\3rdparty\org\eclipse\org.eclipse.core.runtime\3.7.0.v20110110\ Org.eclipse.core.runtime-3.7.0.v20110110.jar;d:\soft\localrepository\org\jibx\config\3rdparty\org\eclipse\ Org.eclipse.equinox.common\3.6.0.v20110523\org.eclipse.equinox.common-3.6.0.v20110523.jar;d:\soft\ Localrepository\org\jibx\config\3rdparty\org\eclipse\org.eclipse.equinox.preferences\3.4.0.v20110502\ Org.eclipse.equinox.preferences-3.4.0.v20110502.jar;d:\soft\localrepository\org\jibx\config\3rdparty\org\ Eclipse\org.eclipse.jdt.core\3.7.0.v_b61\org.eclipse.jdt.core-3.7.0.v_b61.jar;d:\soft\localRepository\org\jibx\config\3rdparty\org\eclipse\org.eclipse.osgi\3.7.0.v20110613\ Org.eclipse.osgi-3.7.0.v20110613.jar;d:\soft\localrepository\org\jibx\config\3rdparty\org\eclipse\ Org.eclipse.text\3.5.100.v20110505-0800\org.eclipse.text-3.5.100.v20110505-0800.jar;d:\soft\localrepository\ Org\jibx\jibx-schema\1.2.5\jibx-schema-1.2.5.jar;d:\soft\localrepository\org\jibx\jibx-extras\1.2.5\ Jibx-extras-1.2.5.jar;d:\soft\localrepository\org\jdom\jdom\1.1.3\jdom-1.1.3.jar;d:\soft\localrepository\javax \servlet\jsp\jsp-api\2.1\jsp-api-2.1.jar;d:\soft\localrepository\org\springframework\spring-context\4.1.1. Release\spring-context-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-aop\4.1.1.release\ Spring-aop-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-beans\4.1.1.release\ Spring-beans-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-core\4.1.1.release\ Spring-core-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-expreSsion\4.1.1.release\spring-expression-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-web \4.1.1.release\spring-web-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-webmvc\4.1.1. Release\spring-webmvc-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-test\4.1.1.release\ Spring-test-4.1.1.release.jar;d:\soft\localrepository\org\springframework\spring-context-support\4.1.1.release \spring-context-support-4.1.1.release.jar;d:\soft\localrepository\org\springframework\security\ Spring-security-core\3.2.4.release\spring-security-core-3.2.4.release.jar;d:\soft\localrepository\aopalliance\ Aopalliance\1.0\aopalliance-1.0.jar;d:\soft\localrepository\org\springframework\security\ Spring-security-config\3.2.4.release\spring-security-config-3.2.4.release.jar;d:\soft\localrepository\org\ Springframework\security\spring-security-web\3.2.4.release\spring-security-web-3.2.4.release.jar;d:\soft\ Localrepository\org\springframework\security\spring-securIty-taglibs\3.2.4.release\spring-security-taglibs-3.2.4.release.jar;d:\soft\localrepository\org\ Springframework\security\spring-security-acl\3.2.4.release\spring-security-acl-3.2.4.release.jar;d:\soft\ Localrepository\org\springframework\spring-jdbc\4.1.1.release\spring-jdbc-4.1.1.release.jar;d:\soft\ Localrepository\org\aspectj\aspectjweaver\1.8.1\aspectjweaver-1.8.1.jar;d:\soft\localrepository\org\apache\ Logging\log4j\log4j-api\2.0.1\log4j-api-2.0.1.jar;d:\soft\localrepository\jstl\jstl\1.2\jstl-1.2.jar;d:\soft\ localrepository\taglibs\standard\1.1.2\standard-1.1.2.jar;d:\soft\localrepository\org\mybatis\mybatis-spring\ 1.2.2\mybatis-spring-1.2.2.jar;d:\soft\localrepository\org\mybatis\mybatis\3.2.8\mybatis-3.2.8.jar;d:\soft\ Localrepository\org\apache\commons\commons-dbcp2\2.0.1\commons-dbcp2-2.0.1.jar;d:\soft\localrepository\org\ Apache\commons\commons-pool2\2.2\commons-pool2-2.2.jar;d:\soft\localrepository\mysql\mysql-connector-java\ 5.1.33\mysql-connector-java-5.1.33.jar;d:\soft\localrePository\commons-io\commons-io\2.0\commons-io-2.0.jar;d:\soft\localrepository\commons-lang\commons-lang\2.6\ Commons-lang-2.6.jar;d:\soft\localrepository\commons-fileupload\commons-fileupload\1.2.1\ Commons-fileupload-1.2.1.jar;d:\soft\localrepository\commons-collections\commons-collections\3.2.1\ Commons-collections-3.2.1.jar;d:\soft\localrepository\org\apache\tomcat\servlet-api\6.0.39\ Servlet-api-6.0.39.jar;d:\soft\localrepository\velocity\velocity\1.5\velocity-1.5.jar;d:\soft\localrepository\ Oro\oro\2.0.8\oro-2.0.8.jar;d:\soft\localrepository\org\apache\tiles\tiles-core\2.2.2\tiles-core-2.2.2.jar;d:\ Soft\localrepository\org\apache\tiles\tiles-api\2.2.2\tiles-api-2.2.2.jar;d:\soft\localrepository\ Commons-digester\commons-digester\2.0\commons-digester-2.0.jar;d:\soft\localrepository\commons-beanutils\ Commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;d:\soft\localrepository\org\apache\tiles\tiles-jsp\2.2.2\ Tiles-jsp-2.2.2.jar;d:\soft\localrepository\org\apache\tiles\tiles-servlet\2.2.2\Tiles-servlet-2.2.2.jar;d:\soft\localrepository\org\apache\tiles\tiles-template\2.2.2\tiles-template-2.2.2.jar ;D: \soft\localrepository\dom4j\dom4j\1.6\dom4j-1.6.jar;d:\soft\localrepository\net\sf\opencsv\opencsv\2.3\ Opencsv-2.3.jar;d:\soft\localrepository\org\apache\poi\poi\3.9\poi-3.9.jar;d:\soft\localrepository\ Commons-codec\commons-codec\1.9\commons-codec-1.9.jar;d:\soft\localrepository\org\apache\poi\poi-ooxml\3.9\ Poi-ooxml-3.9.jar;d:\soft\localrepository\org\apache\poi\poi-ooxml-schemas\3.9\poi-ooxml-schemas-3.9.jar;d:\ Soft\localrepository\org\apache\xmlbeans\xmlbeans\2.3.0\xmlbeans-2.3.0.jar;d:\soft\localrepository\stax\ Stax-api\1.0.1\stax-api-1.0.1.jar;d:\soft\localrepository\org\quartz-scheduler\quartz\2.2.1\quartz-2.2.1.jar;d : \soft\localrepository\c3p0\c3p0\0.9.1.1\c3p0-0.9.1.1.jar;d:\soft\localrepository\org\slf4j\slf4j-api\1.6.6\ Slf4j-api-1.6.6.jar;d:\soft\localrepository\org\quartz-scheduler\quartz-jobs\2.2.1\quartz-jobs-2.2.1.jar;d:\ Soft\localrepository\com\alibaba\fastjsoN\1.1.41\fastjson-1.1.41.jar;d:\soft\localrepository\net\sf\ehcache\ehcache\2.7.0\ehcache-2.7.0.jar;d:\soft\ Localrepository\net\sf\ehcache\ehcache-core\2.6.5\ehcache-core-2.6.5.jar;d:\soft\localrepository\org\ Springframework\security\spring-security-cas-client\3.0.8.release\spring-security-cas-client-3.0.8.release.jar ;D: \soft\localrepository\org\springframework\spring-tx\4.1.1.release\spring-tx-4.1.1.release.jar;d:\soft\ Localrepository\org\jasig\cas\cas-client-core\3.1.10\cas-client-core-3.1.10.jar;d:\soft\localrepository\ Xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;d:\soft\localrepository\org\apache\commons\commons-compress\1.3\ Commons-compress-1.3.jar;d:\soft\localrepository\org\jibx\jibx-run\1.2.5\jibx-run-1.2.5.jar;d:\soft\ Localrepository\joda-time\joda-time\2.1\joda-time-2.1.jar;d:\soft\localrepository\xpp3\xpp3\1.1.3.4.o\ Xpp3-1.1.3.4.o.jar;d:\soft\localrepository\com\jcraft\jsch\0.1.51\jsch-0.1.51.jar;d:\soft\localrepository\org\ Apache\httpcomponents\httpclient\4.3.5\httpclient-4.3.5.jar;d:\soft\localrepository\org\apache\httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar;d:\soft\ localrepository\org\imgscalr\imgscalr-lib\4.2\imgscalr-lib-4.2. Jar -Java lib path: C:\Program Files\java\jdk1.7.0_71\jre\bin; C:\Windows\Sun\Java\bin; C:\Windows\system32; C:\Windows; E:\soft\appcan\AppCanStudioPersonalV3.1\HDK\emulator\mas\; C:\Program Files (x86) \common Files\netsarang; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\;D: \apache-tomcat-7.0.55\bin;d:\apache-tomcat-7.0.55\lib;d:\program Files\apache-maven-3.2.2\bin; E:\soft\spring-roo-1.3.1. Rc1\bin;;. -Java input/Output temp path: c:\users\admini~1\appdata\local\temp -java compiler:NULL +Java execution path: C:\Program files\java\jdk1.7. 0_71\jre\lib\ext; C:\Windows\Sun\Java\lib\ext -Operating system name: Windows 7 + architecture of the operating system: AMD64 AOperating system version number: 6.1 at file delimiter: - path delimiter:; - Line delimiter: -  - Operating System User name: Administrator - operating system User's home directory: C:\Users\Administrator indirectory where the current program is located: D:\mywork\cocopay\manager

Java Basics System.getproperty () method

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.