File file=new file("")
String path=file.getAbsolutePath();
path=path.replaceAll("\\\\","/")+"/"
以上代码和获取的都是项目根目录
System.getProperty("user.dir")
File file=new file("")
String path=file.getAbsolutePath();
path=path.replaceAll("\\\\","/")+"/"
以上代码和获取的都是项目根目录
System.getProperty("user.dir")