Javac could not find or load the main class Com.sun.tools.javac.Main

Source: Internet
Author: User

When the JDK is installed or when the JDK was previously installed, the Java file was not found or could not be loaded with Javac when the main class Com.sun.tools.javac.Main, this problem, the Internet is generally said that the environment variable configuration is wrong, this is not true, generally speaking, if your environment is properly configured to have This problem occurs most often because you will have the JRE in the process of installing the JDK

installation, if you install the JRE and JDK in the same file at this time, it will cause a conflict, the installation will delete the Javac.exe file deleted, so that the use of the Javac command error. I was for this reason for a long time did not fix this problem, finally found the reason on the Internet, generally in the installation process, choose to put the JRE and JDK into two different folders, my is in JAVA\JDK and java\jre two folders, I uninstalled the reload , installed in two different folders, once again using Javac will not have a problem ...

Javac could not find or load the main class Com.sun.tools.javac.Main

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.