File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Running an Application in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Running an Application in Eclipse" Watch "Running an Application in Eclipse" New topic

Running an Application in Eclipse

Mark Hogan

Joined: Jun 24, 2013
Posts: 4
I am a newbie to Eclipse and have a problem with it . When i run a 1 file application , it run corectly . But when i write a 2 file application and run it , Eclipse prduce an error messege like this : Error: Could not find or load main class LabelTest .... I have these 2 files : and ... The main method is defined in pic of Eclipse is uploaded by attachments............Please help me....Thanks

[Thumbnail for untitled.JPG]

Peter Johnson

Joined: May 14, 2008
Posts: 5852

I don't think this error has anything to do with the main method, mainly because the error for a missing main method is different. Instead, I suspect that one of the classes you are referencing is not being loaded. To verify my assertion, comment out the contents of the main method and replace it with a simple System.out.println(); it should then run. If that is the case, then we can try to figure out why the swing classes are not loading.

JBoss In Action
I agree. Here's the link:
subject: Running an Application in Eclipse
jQuery in Action, 3rd edition