Cannot find the system Java compiler. Check that your class path includes Tools.jar error handling

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.