Home > Back-end >  java
java

Time:09-22

Why run Java classes in the command prompt prompt said unable to load the main class

CodePudding user response:

Question is ambiguous, it is ClassNotFound error or said can't find the main method? If the former, the need to use the class is added to the classpath, if the latter, add one main method in your class

CodePudding user response:

reference 1st floor qybao response:
problem is very ambiguous, said is a ClassNotFound error or can't find the main method? If the former, the need to use the class is added to the classpath, if the latter, in your class with a main method

Thank you, I has been solved