• Register
0 votes
144 views

Problem :

I am getting bellow compiler error
error: could not find or load main class com.sun.tools.javac.main
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

You must have done a manual installation of JDK. This error is due to a issues in your JDK installation. Please execute the bellow command in your JAVA_HOME/lib directory to resolve the issue:

unpack200 -r -v -l "" tools.pack tools.jar

Above command will unpack the tools.jar file. After that try to execute:

javac -version

This command should work well.

9 7 4
38,600 points

Related questions

0 votes
1 answer 97 views
97 views
Maybe I am missing a set of Java tools? Not sure
asked Feb 13 TeamScript 13.5k points
0 votes
1 answer 95 views
95 views
Problem: When i am trying run an application in JBOSS 4.0 via eclipse 3.3 i am getting the below exception: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK I had to set the environment variables ... why this error is coming and how to fix. I am able to execute the same application with tomcat 5.0 any one can help me plz
asked Mar 23, 2020 LizzyM 6.1k points
0 votes
1 answer 28 views
0 votes
1 answer 44 views
44 views
Problem: What's the problem here > com sun jdi invocationexception occurred invoking method
asked Mar 19 Azlan2020 2.4k points
0 votes
1 answer 13 views
13 views
Problem: I keep getting this error >could not find or load main class com.company.main.Who can help me to fix it?
asked Mar 27 ashik 14.6k points
0 votes
1 answer 25 views
25 views
Problem: From yesterday i am having problems while installing android studio on my new SSD disc. I tried to turn off firewall, windows defender, run android studio with ADMINISTRATOR rights, also i tried downloading JDK 8 , then JDK 10 , I have ... : 200 OK. Preparing "Install Android Support Repository (revision: 47.0.0)". Downloading dl.google.com/android/repository/android_m2repository_r47.zip
asked Apr 26 anika11 32.2k points
0 votes
1 answer 8 views
8 views
Problem: Do u guys have any suggestions on what am I doing wrong?
asked May 3 salim1 60.6k points
0 votes
1 answer 16 views
16 views
Problem: The minecraft installation (used on both Ubuntu and Windows) that I'm trying to start, comes from Windows (generated by official launcher, forge is installed, I only replace libraries marked as natives because they are platform dependent), and it can be started using ... my custom launcher but only on Ubuntu, as I wrote above. Do u guys have any suggestions on what am I doing wrong?
asked May 2 sumaiya simi 43.9k points
1 vote
1 answer 3 views
3 views
Problem: As a new Java developer I would like to know the reason of this error? Error: could not find or load main class helloworld.java.
asked Apr 26 PkGuy 23.5k points
0 votes
1 answer 3 views
3 views
Problem: What caused the error" Error could not find or load main class spring boot. " ?
asked Apr 26 salim1 60.6k points