• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes

Problem :

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

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 (30.3k points)