File f = new File(FileUtils.getTempDirectory(), "xx.zip");
System.out.println(modelPath);//C:\Users\小松\AppData\Local\Temp\xx.zip
File modelPath = new File(System.getProperty("java.io.tmpdir"), "xx.zip");
System.out.println(modelPath);
String rootPath = System.getProperty("user.dir");
String modelDirPath = rootPath.substring(0, rootPath.lastIndexOf(File.separatorChar)) + File.separatorChar + "out" + File.separatorChar + "models";
String modelPath = modelDirPath + File.separatorChar + "xx.json";//D:\workspace\JavaDL\out\models\xx.json
来源:oschina
链接:https://my.oschina.net/u/3209854/blog/3139200