master
chentaisen 2024-09-05 16:53:10 +08:00
parent 033d05d819
commit 7807aed071
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ public class OSSFileDownload {
public static Result<Object> compile(String fileName) { public static Result<Object> compile(String fileName) {
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
String[] strings = {"-classpath", "/home/lib", "-verbose", "-d", "/home/lib", fileName+".java"}; String[] strings = {"-classpath", "/home/lib", "-verbose", "-d", "/home/lib", "/home/"+fileName+".java"};
//编译任务 //编译任务
int result = compiler.run(null, null, null, strings); int result = compiler.run(null, null, null, strings);
//检查编译结果 //检查编译结果