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. Then you need to execute it using the java command as − java class_name 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. Why does my code return this error: mysqlquery() access denied for user localhos insufficient permissions when trying to get Google Spreadsheet meta info Insert new row in data table VBA Excel2010 ActiveX Objective - C to Swift : NSData with NSJSONSerialisation MAMP 3.2 debug. 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).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |