System. getproperty () Common Values

Source: Internet
Author: User
Tags file separator java format

Occasionally, system. getproperty () is used, which is inconvenient to find. Here is the record memo:

 

Written Test classes:

Public class testsystemproperty <br/>{< br/> Public static void main (string [] ARGs) <br/>{< br/> system. out. println ("Java Runtime Environment version:/N" + system. getproperty ("Java. version "); <br/> system. out. println ("Java Runtime Environment vendor:/N" + system. getproperty ("Java. vendor "); <br/> system. out. println ("Java vendor URL:/N" + system. getproperty ("Java. vendor. URL "); <br/> system. out. println ("Java installation directory:/N" + system. getproperty ("Java. home "); <br/> system. out. println ("Java Virtual Machine Specification Version:/N" + system. getproperty ("Java. VM. specification. version "); <br/> system. out. println ("Java class format version:/N" + system. getproperty ("Java. class. version "); <br/> system. out. println ("Java class path:/N" + system. getproperty ("Java. class. path "); <br/> system. out. println ("List of paths searched during Database loading:/N" + system. getproperty ("Java. library. path "); <br/> system. out. println ("Default temporary file path:/N" + system. getproperty ("Java. io. tmpdir "); <br/> system. out. println ("Name of the JIT compiler to be used:/N" + system. getproperty ("Java. compiler "); <br/> system. out. println ("path of one or more extended directories:/N" + system. getproperty ("Java. ext. dirs "); <br/> system. out. println ("operating system name:/N" + system. getproperty ("OS. name "); <br/> system. out. println ("Operating System Architecture:/N" + system. getproperty ("OS. arch "); <br/> system. out. println ("operating system version:/N" + system. getproperty ("OS. version "); <br/> system. out. println ("file separator ("/"in UNIX systems):/N" + system. getproperty ("file. separator "); <br/> system. out. println ("path separator (": "in UNIX systems):/N" + system. getproperty ("path. separator "); <br/> system. out. println ("line separator ("/n "in UNIX):/N" + system. getproperty ("line. separator "); <br/> system. out. println ("User Account name:/N" + system. getproperty ("user. name "); <br/> system. out. println ("user's home directory:/N" + system. getproperty ("user. home "); <br/> system. out. println ("current working directory of the User:/N" + system. getproperty ("user. dir "); <br/>}< br/>}

 

 

From JDK 1.5.0 documents ents

Java. Version

Java Runtime Environment version

Java. Vendor

Java Runtime Environment vendor

Java. Vendor. url

Java vendor URL

Java. Home

Java installation directory

Java. VM. Specification. Version

Java Virtual Machine standard version

Java. VM. Specification. Vendor

Java virtual machine specification vendor

Java. VM. Specification. Name

Java virtual machine specification name

Java. VM. Version

Java Virtual Machine implementation version

Java. VM. Vendor

Java Virtual Machine implementation vendor

Java. VM. Name

Java Virtual Machine implementation name

Java. Specification. Version

Java Runtime Environment Standard version

Java. Specification. Vendor

Java Runtime Environment specification vendor

Java. Specification. Name

Java Runtime Environment specification name

Java. Class. Version

Java format version number

Java. Class. Path

Java class path

Java. Library. Path

List of search paths when the library is loaded

Java. Io. tmpdir

Default temporary file path

Java. Compiler

Name of the JIT compiler to be used

Java. Ext. dirs

Path of one or more extended Directories

OS. Name

Operating system name

OS. Arch

Operating System Architecture

OS. Version

Operating system version

File. Separator

File separator ("/" in UNIX)

Path. Separator

Path separator (":" in UNIX)

Line. Separator

Line separator ("/n" in UNIX ")

User. Name

User Account Name

User. Home

User's home directory

User. dir

Current working directory of the user

 

 

The running result is:

 

 

 

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.