解决Fel:Cannot find the system Java compiler. Check that your class path includes tools.jar

时间:2024-03-24 09:36:48

使用Fel时部署项目后出现“java.lang.IllegalStateException: Cannot find the system Java compiler. Check that your class path includes tools.jar”异常,如图:

解决Fel:Cannot find the system Java compiler. Check that your class path includes tools.jar

原因是“ToolProvider.getSystemJavaCompiler()”为空

解决Fel:Cannot find the system Java compiler. Check that your class path includes tools.jar解决办法:

将%JAVA_HOME%\lib\tools.jar文件复制到%JAVA_HOME%\jre\lib\目录下