Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why couldn't my project run?

 
Ben Colorful
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use eclipse 3.0, it always notifies me "couldn't find the main class,program will exit".It seems all things stay on the last project, when i edit code, there is no reaction(e.x. highlights keyword).
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you click "run" in eclipse, and set up the main class, it has a search button or something as well to find it, maybe use that because it will only list classes that have a main method.
 
Maiya Wu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did u save it as a .java file?
 
Ben Colorful
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,i've alredy saved it as a .java file.

i tried to find the main class but nothing was found.

The last project can be run OK.


OS:win2000 professional Simplified Chinese Edition
JDK: 1.4.1_02

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the IDEs and Other Tools forum...
 
Fred Grott
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben you are confusing main class with main method..please read this doc at this url:

http://java.sun.com/docs/books/tutorial/getStarted/application/main.html
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your project a Java Project? Did you set the Build Path correctly (especially the source path)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic