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 get user home directory name by using java program?

0 votes
121 views
asked May 13, 2014 by smith Geek (15,340 points)

1 Answer

0 votes
public class Main {
  public static void main(String[] args) {
    String userHome = "user.home";
 
    String path = System.getProperty(userHome);
 
    System.out.println("Your Home Path: " + path);
  }
}
 
 
 
answered May 13, 2014 by rock Expert (14,990 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 97 views
97 views asked May 13, 2014 by smith Geek (15,340 points)
0 votes
2 answers 947 views
947 views asked May 8, 2014 by rock Expert (14,990 points)
0 votes
1 answer 81 views
0 votes
1 answer 101 views
101 views asked May 13, 2014 by augustaina Sr Member (4,820 points)
...