![]() ![]() It can be set using either the -classpath option when executing a program or by setting the system CLASSPATH environment variable.Īs the name suggests, it's simply a file path where the. The classpath is the file path that the Java runtime environment searches for classes and other resource files. ![]() Read on to find out how you can get rid of this error once and for all.īefore we try to understand how and why JVM was not able to find the main class, we need to understand the concept of Classpath in Java. If you keep getting the main class not found error in your Java project for no apparent reason, don't worry, you're not alone.Īs one of the most unforeseeable and spontaneous errors, thanks to JVM's (Java Virtual Machine) tendency to stick to a default classpath, the 'main class not found' issue is something that haunts amateurs and professionals alike.īut this issue is actually less intimidating than it seems to be.
0 Comments
Leave a Reply. |