public String getCurrentPath(){
//取得根目录路径
String rootPath=getClass().getResource("/").getFile().toString();
//当前目录路径
String currentPath1=getClass().getResource(".").getFile().toString();
String currentPath2=getClass().getResource("").getFile().toString();
//当前目录的上级目录路径
String parentPath=getClass().getResource("../").getFile().toString();
return rootPath;
}
路径path
最新推荐文章于 2023-03-06 08:00:00 发布