C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

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

0 votes
102 views
asked by smith Geek (15,340 points)

1 Answer

0 votes
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
answered by augustaina Sr Member (4,820 points)

Related questions

0 votes
1 answer 109 views
0 votes
1 answer 35 views
0 votes
1 answer 110 views
+1 vote
1 answer 19 views
+1 vote
1 answer 22 views
...