feat():测试

yuan
yuan 2024-09-05 17:45:50 +08:00
parent 5427bc562f
commit 051671a23c
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ public class JavaFileCompile {
try {
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
String[] strings = {"-classpath","/home/lib","-verbose","-d", "/home/lib",fileName + MethodSuffix.JAVASUFFIX };
String[] strings = {"-classpath","/home/lib","-verbose","-d", "/home/lib","home/"+fileName + MethodSuffix.JAVASUFFIX };
// 执行编译任务
int result = compiler.run(null, null, null, strings);
// 检查编译结果

View File

@ -72,7 +72,7 @@ public class OSSFileLoad {
}
//对路径里的.java文件进行编译
System.out.println("第一步");
JavaFileCompile.compile("home/"+fileName);
JavaFileCompile.compile(fileName);
// SourceCodeCompiler.javaCompilerPath("home/");
// System.out.println("第二步");
// File outputDir = new File("home/"); // 或者是你指定的其他输出目录