Wrong class name − You might have specified the wrong class name. class file (just name) which is in the current directory.įollowing are the scenarios where this error could occur − To avoid this error, you need to specify the absolute (including packages) name of the. class file with the specified name then a run time error occurs saying “Could not found or load main class” error as − D:\sample>java ExampleĮrror: Could not find or load main class ExampleĬaused by: : Example Solution While executing, when JVM does not find a. For the desired PID use any of them on part 5 of the guide. On the Smogon guide read the entirety of the page I linked. My antivirus told me that it could be a virus but I'm pretty sure it was a false alarm. Then you need to execute it using the java command as − java class_name For RNG Reporter get the latest version here, I am using version 10.3.4.
Once you resolve them and compile your program success fully, an executable file with the same name as your class name is generated in your current folder, with the.
Once you write a Java program you need to compile it using the javac command, this shows you the compile time errors occurred (if any).