// System.out.println(this.getClass().getResource("").getPath()); // 當前類路徑
System.out.println(this.getClass().getResource("/").getPath()); // 當前類根路徑
String path = System.getProperty("user.dir"); // 當前項目根路徑
// String path = System.getProperty("user.dir") + "\\src"; // 當前項目src
12-11
9112
01-17
1752
07-13
149
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交