aspose file tools*
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
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Running an Application in Eclipse" Watch "Running an Application in Eclipse" New topic
Author

Running an Application in Eclipse

Mark Hogan
Greenhorn

Joined: Jun 24, 2013
Posts: 4
Hi
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 : LabelFrame.java and LabelTest.java ... The main method is defined in LabelTest.java.....a pic of Eclipse is uploaded by attachments............Please help me....Thanks


[Thumbnail for untitled.JPG]

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

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
 
jQuery in Action, 2nd edition
 
subject: Running an Application in Eclipse