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.