When I started the project today, I encountered
Java.lang.illegalstateexception:Cannot Find the System Java compiler. Check that your class path includes Tools.jar
The main reason is because the compiler could not find Tools.jar at compile time
Solution One: Copy the%java_home%\lib\tools.jar file to the%java_home%\jre\lib\ directory
Solution Two: Right-click the JRE System under All project Libray-->properties, on the interface, click Installed jres--> Select the directory such as C:\Program files\java\ jre1.8.0_60, click Add External JARs in the pop-up interface, add the Jdk-lib-tools.jar.
Solution Three: Open your eclipse---window--preferences--installed jres edit the JRE, and change the path of the JRE home to the JDK path
?
The third scenario that I met is that the project needs to access Tools.jar at run time, which is accessed through the JRE path you configure to not simply load the jar package, so the 12th scenario does not apply.
General project run only requires the runtime environment JRE is enough, some special need to use the development environment JDK, two environments are different, such as today encountered a problem tools.jar in the JRE environment can not find
Cannot find the system Java compiler. Check that your class path includes Tools.jar error handling