Menu

Could not find or load main class MainClass

Error: Could not find or load main class MainClass

While running the Java program user see this compilation error. There are two ways to fix this.

1. Go to package where file is located and run the java compiler javac filename.java

2. Provide full directory path to Java compiler like; javac C:/desktop/jorvee/javasample/javapackage/javafile.java

No comments:

Post a Comment