Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Error:selection does not contain a main type(Error:selection does not contain a main type)
Error:selection does not contain a main type [message #829714] Mon, 26 March 2012 17:32 Go to next message
Dennis Ma is currently offline Dennis Ma
Messages: 3
Registered: March 2012
Junior Member
I don't know which type of the selections to select in the run configurition.Please give me some advice.

[Updated on: Mon, 26 March 2012 17:33]

Report message to a moderator

Re: Error:selection does not contain a main type [message #829770 is a reply to message #829714] Mon, 26 March 2012 19:09 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1344
Registered: July 2009
Senior Member
The one that has the public static void main(String[]) method in it.
Re: Error:selection does not contain a main type [message #830277 is a reply to message #829770] Tue, 27 March 2012 12:28 Go to previous messageGo to next message
Dennis Ma is currently offline Dennis Ma
Messages: 3
Registered: March 2012
Junior Member
I have tried the static method,but I still had a question whether there are other methods can be used.
Re: Error:selection does not contain a main type [message #830278 is a reply to message #830277] Tue, 27 March 2012 12:29 Go to previous messageGo to next message
Dennis Ma is currently offline Dennis Ma
Messages: 3
Registered: March 2012
Junior Member
It's like "public void run".
Re: Error:selection does not contain a main type [message #830462 is a reply to message #830278] Tue, 27 March 2012 17:06 Go to previous message
David Wegener is currently offline David Wegener
Messages: 1344
Registered: July 2009
Senior Member
No, it can't be public void run. It has to be public static void main(String[])
Previous Topic:Unable to run Maven Commands from Eclipse IDE
Next Topic:Java SWT Image and Transparency
Goto Forum:
  


Current Time: Mon Oct 20 08:10:15 GMT 2014

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

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