Eclipse Setup Help

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

Page 1 of 1

9 Replies - 3124 Views - Last Post: 12 June 2008 - 03:20 PM Rate Topic: -----

#1 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Eclipse Setup Help

Posted 11 June 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.

// 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 June 2008 - 10:26 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Eclipse Setup Help

#2 prajayshetty  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 31
  • View blog
  • Posts: 920
  • Joined: 27-April 07

Re: Eclipse Setup Help

Posted 11 June 2008 - 10:35 AM

View PostLocke37, on 11 Jun, 2008 - 10:24 AM, said:

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.

// 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
Was This Post Helpful? 0
  • +
  • -

#3 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: Eclipse Setup Help

Posted 11 June 2008 - 10:44 AM

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

Thanks!
Was This Post Helpful? 0
  • +
  • -

#4 prajayshetty  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 31
  • View blog
  • Posts: 920
  • Joined: 27-April 07

Re: Eclipse Setup Help

Posted 11 June 2008 - 10:48 AM

View PostLocke37, on 11 Jun, 2008 - 10:44 AM, said:

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

Thanks!


welcome u help us we help u :P
Was This Post Helpful? 0
  • +
  • -

#5 mensahero  Icon User is offline

  • I Desire...
  • member icon

Reputation: 17
  • View blog
  • Posts: 678
  • Joined: 26-May 08

Re: Eclipse Setup Help

Posted 11 June 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: .. thats pretty fast..

This post has been edited by mensahero: 11 June 2008 - 10:49 AM

Was This Post Helpful? 0
  • +
  • -

#6 prajayshetty  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 31
  • View blog
  • Posts: 920
  • Joined: 27-April 07

Re: Eclipse Setup Help

Posted 11 June 2008 - 10:50 AM

View Postmensahero, on 11 Jun, 2008 - 10:49 AM, said:

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. :blink: .. 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 June 2008 - 11:02 AM

Was This Post Helpful? 0
  • +
  • -

#7 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: Eclipse Setup Help

Posted 11 June 2008 - 10:01 PM

View Postprajayshetty, on 11 Jun, 2008 - 10:50 AM, said:

View Postmensahero, on 11 Jun, 2008 - 10:49 AM, said:

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. :blink: .. 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 June 2008 - 10:02 PM

Was This Post Helpful? 0
  • +
  • -

#8 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8343
  • View blog
  • Posts: 31,890
  • Joined: 06-March 08

Re: Eclipse Setup Help

Posted 11 June 2008 - 10:26 PM

View Postprajayshetty, on 11 Jun, 2008 - 10:50 AM, said:

View Postmensahero, on 11 Jun, 2008 - 10:49 AM, said:

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. :blink: .. 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)
Was This Post Helpful? 0
  • +
  • -

#9 prajayshetty  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 31
  • View blog
  • Posts: 920
  • Joined: 27-April 07

Re: Eclipse Setup Help

Posted 12 June 2008 - 09:19 AM

View Postpbl, on 11 Jun, 2008 - 10:26 PM, said:

View Postprajayshetty, on 11 Jun, 2008 - 10:50 AM, said:

View Postmensahero, on 11 Jun, 2008 - 10:49 AM, said:

prajayShetty:

Hey.. good to see that you're pretty fast in learning your IDE.. Hope to see you more around here.. :blink: .. 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
Was This Post Helpful? 0
  • +
  • -

#10 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: Eclipse Setup Help

Posted 12 June 2008 - 03:20 PM

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1