Technical QQ Exchange Group: javadream:251572072
Tutorials Download, online exchange: it.yunsit.cn
I ran into this problem and searched the Internet.
Problem Description: My problem is that when compiling the test program city using Javac, the following error occurred:
Error: The main class could not be found or could not be loaded Com.sun.tools.javac.Main
Solution: When this error occurs, Baidu, as a result, many people are saying that the environment variable set error, but check the environment variables, there is no problem.
At this time, see the error message has Javac, guess is probably not find javac this file, so to Jdk\bin directory, found no Javac.exe file, Internet Baidu
Only to know that during the installation of the JDK, there will also be a JRE installed, this and JDK can not be installed in the same directory, otherwise it will conflict, delete the Javac.exe file. Before I put the JDK
Installed under the D:\JAVA, the JRE is also under D:\JAVA, so uninstall, reinstall, the JDK installed in the D:\JAVA\JDK,JRE installation under D:\JAVA\JRE, and then Javac compiled
Test the program without errors and install successfully.
---------------------------------------------------------------
The concrete javac.exe seems to be no less, but it really can be used after doing so.
----------------------------------------------------------------
C#. NET Verification Code Intelligent Identification Learning Note---06 Troubleshooting Java JRE problem: Jtessboxeditor.jar open times cannot find or load main class Com.sun.tools.javac.Main error