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
97 views
asked May 13, 2014 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 May 13, 2014 by augustaina Sr Member (4,820 points)

Related questions

0 votes
1 answer 103 views
103 views asked May 13, 2014 by rock Expert (14,990 points)
0 votes
1 answer 35 views
35 views asked Feb 18, 2014 by john Guru (27,140 points)
0 votes
1 answer 104 views
104 views asked May 13, 2014 by augustaina Sr Member (4,820 points)
+1 vote
1 answer 16 views
+1 vote
1 answer 20 views
20 views asked Feb 6, 2014 by keem Expert (13,240 points)
...