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
135 views
asked 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 by rock Expert (14,990 points)

Related questions

0 votes
1 answer 109 views
0 votes
1 answer 102 views
0 votes
2 answers 950 views
0 votes
1 answer 106 views
...