修改容器部路径
parent
6969e6e8ac
commit
8ba87155b1
|
@ -39,9 +39,9 @@ public class OSSFileDownload {
|
|||
// 本地文件下载路径
|
||||
String localPath = "/home/" + objectName;
|
||||
ObjectMetadata object = ossClient.getObject(new GetObjectRequest(bucketName, filePath + objectName), new File(localPath));
|
||||
System.out.println("文件路径是:"+filePath);
|
||||
System.out.println("新文件路径是:"+localPath);
|
||||
System.out.println("文件名称为:"+object);
|
||||
System.out.println("文件路径是:" + filePath);
|
||||
System.out.println("新文件路径是:" + localPath);
|
||||
System.out.println("文件名称为:" + object);
|
||||
ossClient.shutdown();
|
||||
return Result.success(source);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,9 @@ public class JavaClass {
|
|||
public static Result<Object> compile(String fileName) {
|
||||
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
|
||||
String[] strings = {"-classpath", "/home/lib", "-verbose", "-d", "/home/lib", "/home/" + fileName + ".java"};
|
||||
System.out.println("路径参数是:"+strings);
|
||||
int result = compiler.run(null, null, null, strings);
|
||||
System.out.println("编译结果是:"+result);
|
||||
if (result == 0) {
|
||||
System.out.println("编译成功,生成的.class文件位于源代码同目录");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue