Set System Properties in Java
Description
The following code shows how to set System Properties.
Example
//from w ww . j a v a2s .c o m
public class Main {
public static void main(String[] a) {
String oldValue = System.clearProperty("java.class.path");
System.setProperty("user.dir", "C:/MyProg");
System.out.println(System.getProperty("user.dir"));
}
}
The code above generates the following result.