Eclipse Run error: "Selection does not contain a main type"
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Keith_Corlett
Posted On:   Saturday, May 3, 2008 03:38 AM

Folks, I've just downloaded eclipse-java-europa-winter-win32.zip to try it out: Eclipse Platform Version: 3.3.2 Build id: M20080221-1800 I created a project from existing java source (which compiles and runs fine at the command line). (Before even attempting to run it) I noticed that everything was in the default package so I created a package and moved the source files into it. When I attempt to run it (MENU: Run ~ Run) I get the rather cryptic error message: "Selection does not contain a main type". I googled around and found a few threads on various forums, and and have tried to follow the suggested solutions... It appears that repackaging was a BIG   More>>

Folks,

I've just downloaded eclipse-java-europa-winter-win32.zip to try it out:

			
Eclipse Platform
Version: 3.3.2
Build id: M20080221-1800


I created a project from existing java source (which compiles and runs fine at the command line).

(Before even attempting to run it) I noticed that everything was in the default package so I created a package and moved the source files into it.

When I attempt to run it (MENU: Run ~ Run) I get the rather cryptic error message: "Selection does not contain a main type".

I googled around and found a few threads on various forums, and and have tried to follow the suggested solutions...
It appears that repackaging was a BIG mistake (for a newbie), coz eclipse refactors the code OK but then forgets where the main class is. Suggested solution is to change the "Launch config" for the project to set the main class explicitly... which I've tried to do but I don't see any classes listed in the "Select Main Type" dialogue box... so I'm stuck.

Please can anyone help?

Thanx all. Keith.    <<Less
About | Sitemap | Contact