java类库详细讲解
源代码在线查看: getsystemproperty.html
Getting and Setting the Value of a System Property
(Java Developers Almanac Example)
BODY CODE {font-family: Courier, Monospace; font-size: 11pt} TABLE, BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt} PRE {font-family: Courier, Monospace; font-size: 10pt} H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt} A.eglink {text-decoration: none} A:hover.eglink {text-decoration: underline} -->
The Java Developers Almanac 1.4
Order this book from Amazon.
Home
>
List of Packages
>
java.lang
[58 examples]
>
System Properties
[3 examples]
e86.
Getting and Setting the Value of a System Property
// Get a system property
String dir = System.getProperty("user.dir");
// Set a system property
String previousValue = System.setProperty("application.property", "newValue");
Related Examples
e87.
Setting the Value of a System Property from the Command Line
e88.
Listing All System Properties
See also:
Arrays
Assertions
Classes
Commands
Numbers
Objects
Strings
Threads
© 2002 Addison-Wesley.