Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Cannot run any java applications(I cannot run any java applications)
Cannot run any java applications [message #486906] Sun, 20 September 2009 21:25 Go to next message
Ryan  is currently offline Ryan Friend
Messages: 2
Registered: September 2009
Junior Member
Hello, I just downloaded Eclipse for Java Developers last night and i made the simple "Hello World" application and when I go to run the program it says: "Selection does not contain a main type" and won't let me run the program. I don't know why it says this or how to fix it. I am new to eclipse and java so i don't really know my way around it yet. I downloaded eclipse so that I can learn it and learn the java language.

Any help would be greatly appreciated!

Thanks
Re: Cannot run any java applications [message #486908 is a reply to message #486906] Sun, 20 September 2009 21:37 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
On Sun, 20 Sep 2009 17:25:57 -0400, Ryan wrote:
> Hello, I just downloaded Eclipse for Java Developers last night and i
> made the simple "Hello World" application and when I go to run the
> program it says: "Selection does not contain a main type" and won't let
> me run the program. I don't know why it says this or how to fix it. I am
> new to eclipse and java so i don't really know my way around it yet. I
> downloaded eclipse so that I can learn it and learn the java language.

I don't think I'd try to pick up a programming language with advanced
tools to assist me but perhaps that's just me.

In any case, you should verify that your application's main method is
actually written properly. Here is an example, for your benefit:
http://en.wikipedia.org/wiki/Java_%28programming_language%29 #Hello_world

You should also ensure that there are .class files being generated
(although if they weren't you would probably get a different error.

These might help:
http://eclipsetutorial.sourceforge.net/

Regards,
Remy
Re: Cannot run any java applications [message #486925 is a reply to message #486906] Mon, 21 September 2009 05:16 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

Hi Ryan,

I getting started guide with Eclipse and Java can be found here:
http://www.vogella.de/articles/Eclipse/article.html

Best regards, Lars

--
http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter

Ryan wrote:
> Hello, I just downloaded Eclipse for Java Developers last night and i
> made the simple "Hello World" application and when I go to run the
> program it says: "Selection does not contain a main type" and won't let
> me run the program. I don't know why it says this or how to fix it. I am
> new to eclipse and java so i don't really know my way around it yet. I
> downloaded eclipse so that I can learn it and learn the java language.
> Any help would be greatly appreciated!
>
> Thanks
Re: Cannot run any java applications [message #487079 is a reply to message #486906] Mon, 21 September 2009 18:51 Go to previous message
Ryan  is currently offline Ryan Friend
Messages: 2
Registered: September 2009
Junior Member
never mind lol i figured it out.. it was as simple as re-installing the program Razz
Previous Topic:Error installing WTP
Next Topic:Resolve dependency on org.eclipse.swt
Goto Forum:
  


Current Time: Sat Dec 20 18:42:05 GMT 2014

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

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