ProAnswers.org

How can we Set System Properties by using the java program?

public class MainClass {
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”));
}
}
output
C:/MyProg