Programmers learn & share
0 votes
69 views

Problem :

I am getting bellow compiler error
error: could not find or load main class com.sun.tools.javac.main
by (6.9k points)   | 69 views

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.

by (36.1k points)  
2,183 questions
2,486 answers
59 comments
241 users