Skip to main content



      Home
Home » Newcomers » Newcomers » Error message Cant find class or load main
Error message Cant find class or load main [message #1836677] Mon, 11 January 2021 19:26 Go to next message
Eclipse UserFriend
Hi I am using Eclipse 20-12 to try to write Java code. Via Java SE Develop Kit 11.0.9. in Windows 10.
I am getting this error

Error: Could not find or load main class MySweetProgram
Caused by: java.lang.ClassNotFoundException: MySweetProgram



public class MySweetProgram {

public static void main(String[] args) {
System.out.println("Hello World!");

}

}

and I not including something in the code or possibly compiler was installed wrong ? Thanks in advance
Re: Error message Cant find class or load main [message #1836679 is a reply to message #1836677] Mon, 11 January 2021 23:39 Go to previous message
Eclipse UserFriend
Have you tried putting your class somewhere other than the Default Package (i.e. by creating a New Package and dragging the class into it)? And does this message happen when using Run As->Java Application from inside Eclipse with the class selected?
Previous Topic:Window Builder. HELP ME!
Next Topic:Eclipse RCP Application (using p2 repo) Build automation using Ant
Goto Forum:
  


Current Time: Sun Jul 13 10:29:31 EDT 2025

Powered by FUDForum. Page generated in 0.97136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top