This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
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: 5812
    
    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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Running an Application in Eclipse
 
Similar Threads
jar issues
need help in deploying Jwebmail which is totally servlet technology
Web Application in tomcat 7 issue
error delploying ear file on JBOSS 3.0.8
struts 2 in eclipse