第一次写博文
* @param porjectPath 项目路径
* @param filePth 文件路径
String[] arg0 = new String[]{"-d", porjectPath, filePth};
JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
int status = javaCompiler.run(null, null, null, arg0);
System.out.println(status);
可以在filepath 下面找到对应的.class 文件