Welcome to Dream.In.Code
Become a Java Expert!

Join 150,053 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,734 people online right now. Registration is fast and FREE... Join Now!




Eclipse Setup Help

 
Reply to this topicStart new topic

Eclipse Setup Help, Finally "upgraded" to Eclipse, but I get an error

Locke37
11 Jun, 2008 - 09:24 AM
Post #1

Contributor of the Year
Group Icon

Joined: 20 Mar, 2008
Posts: 1,274



Thanked: 57 times
Dream Kudos: 325
My Contributions
Ok, so when I tried to run my first TINY (as in, 1 line of code which is a println() statement), I got this error that says...

QUOTE
Selection does not contain a main type.


In case anyone wants to look at my code...here it is, although if I don't get this right, I should start looking for a new objective in life.

java
// Test.java
// this is just a test to see if enerything is set up properly.

public class Test
{
public static void main(String args[])
{
System.out.println("Eclipse is working!");
}
}


This post has been edited by Locke37: 11 Jun, 2008 - 09:26 AM
User is offlineProfile CardPM
+Quote Post

prajayshetty
RE: Eclipse Setup Help
11 Jun, 2008 - 09:35 AM
Post #2

D.I.C Head
Group Icon

Joined: 27 Apr, 2007
Posts: 230



Thanked: 1 times
Dream Kudos: 25
My Contributions
QUOTE(Locke37 @ 11 Jun, 2008 - 10:24 AM) *

Ok, so when I tried to run my first TINY (as in, 1 line of code which is a println() statement), I got this error that says...

QUOTE
Selection does not contain a main type.


In case anyone wants to look at my code...here it is, although if I don't get this right, I should start looking for a new objective in life.

java
// Test.java
// this is just a test to see if enerything is set up properly.

public class Test
{
public static void main(String args[])
{
System.out.println("Eclipse is working!");
}
}


even i was having the same problem do the following thing
start eclipse
and then click on the help
then click on welcome
and then click on tuitorial
and then
create hello world application
and then follow the step
this should solve the problem

one more thing make sure that ur main class file name and that file name is same then one that contains mainmethod
and ya for running go to package explorer where it lists all files
in that right click and then run as application and then java application and then ok
if jdk is proper everything should go fine and if ur jdk is not ok check this posthere
download the one that mashero posted without beta 10
and then it should work


User is offlineProfile CardPM
+Quote Post

Locke37
RE: Eclipse Setup Help
11 Jun, 2008 - 09:44 AM
Post #3

Contributor of the Year
Group Icon

Joined: 20 Mar, 2008
Posts: 1,274



Thanked: 57 times
Dream Kudos: 325
My Contributions
I guess my problem was my java file wasn't in the src folder.

Thanks!
User is offlineProfile CardPM
+Quote Post

prajayshetty
RE: Eclipse Setup Help
11 Jun, 2008 - 09:48 AM
Post #4

D.I.C Head
Group Icon

Joined: 27 Apr, 2007
Posts: 230



Thanked: 1 times
Dream Kudos: 25
My Contributions
QUOTE(Locke37 @ 11 Jun, 2008 - 10:44 AM) *

I guess my problem was my java file wasn't in the src folder.

Thanks!


welcome u help us we help u tongue.gif
User is offlineProfile CardPM
+Quote Post

mensahero
RE: Eclipse Setup Help
11 Jun, 2008 - 09:49 AM
Post #5

c0mput3rz Are Only Human
Group Icon

Joined: 26 May, 2008
Posts: 664



Thanked: 17 times
Dream Kudos: 75
My Contributions
prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. blink.gif .. thats pretty fast..

This post has been edited by mensahero: 11 Jun, 2008 - 09:49 AM
User is offlineProfile CardPM
+Quote Post

prajayshetty
RE: Eclipse Setup Help
11 Jun, 2008 - 09:50 AM
Post #6

D.I.C Head
Group Icon

Joined: 27 Apr, 2007
Posts: 230



Thanked: 1 times
Dream Kudos: 25
My Contributions
QUOTE(mensahero @ 11 Jun, 2008 - 10:49 AM) *

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. blink.gif .. thats pretty fast..


ya thanks to u guys hey one more thing can i run c/c++ code in this ide


This post has been edited by prajayshetty: 11 Jun, 2008 - 10:02 AM
User is offlineProfile CardPM
+Quote Post

Locke37
RE: Eclipse Setup Help
11 Jun, 2008 - 09:01 PM
Post #7

Contributor of the Year
Group Icon

Joined: 20 Mar, 2008
Posts: 1,274



Thanked: 57 times
Dream Kudos: 325
My Contributions
QUOTE(prajayshetty @ 11 Jun, 2008 - 10:50 AM) *

QUOTE(mensahero @ 11 Jun, 2008 - 10:49 AM) *

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. blink.gif .. thats pretty fast..


ya thanks to u guys hey one more thing can i run c/c++ code in this ide


Yes, it is a multi-language IDE, you just have to download the different components. I actually use the C++ one, as a completely separate IDE, but I came across an error there in running too...

QUOTE
Launch failed, no binaries


Any ideas?

This post has been edited by Locke37: 11 Jun, 2008 - 09:02 PM
User is offlineProfile CardPM
+Quote Post

pbl
RE: Eclipse Setup Help
11 Jun, 2008 - 09:26 PM
Post #8

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,587



Thanked: 233 times
Dream Kudos: 75
My Contributions
QUOTE(prajayshetty @ 11 Jun, 2008 - 10:50 AM) *

QUOTE(mensahero @ 11 Jun, 2008 - 10:49 AM) *

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. blink.gif .. thats pretty fast..


ya thanks to u guys hey one more thing can i run c/c++ code in this ide

I stopped using Eclipse as C/C++ IDE because you have to make to make files "by hand"
And I must admit that coming from the VMS world makefile are quite obscur to me
No makefile no executable built
That is why for C/C++ I use Quincy (free IDE) ... they say it is for students... but it takes care of your makefiel for you (actually recompiling everyting each time but on a Pentium who cares)
User is online!Profile CardPM
+Quote Post

prajayshetty
RE: Eclipse Setup Help
12 Jun, 2008 - 08:19 AM
Post #9

D.I.C Head
Group Icon

Joined: 27 Apr, 2007
Posts: 230



Thanked: 1 times
Dream Kudos: 25
My Contributions
QUOTE(pbl @ 11 Jun, 2008 - 10:26 PM) *

QUOTE(prajayshetty @ 11 Jun, 2008 - 10:50 AM) *

QUOTE(mensahero @ 11 Jun, 2008 - 10:49 AM) *

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. blink.gif .. thats pretty fast..


ya thanks to u guys hey one more thing can i run c/c++ code in this ide

I stopped using Eclipse as C/C++ IDE because you have to make to make files "by hand"
And I must admit that coming from the VMS world makefile are quite obscur to me
No makefile no executable built
That is why for C/C++ I use Quincy (free IDE) ... they say it is for students... but it takes care of your makefiel for you (actually recompiling everyting each time but on a Pentium who cares)

thanks will check out quincy
User is offlineProfile CardPM
+Quote Post

Locke37
RE: Eclipse Setup Help
12 Jun, 2008 - 02:20 PM
Post #10

Contributor of the Year
Group Icon

Joined: 20 Mar, 2008
Posts: 1,274



Thanked: 57 times
Dream Kudos: 325
My Contributions
QUOTE
thanks will check out quincy


I'll just use MS Visual C++ Express Ed., like I was before. I don't know enough about C++ or makefiles to make them myself.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:21PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month