Meaningless Drivel is fun!
The moose likes IDEs, Version Control and other tools and the fly likes why couldn't my project run? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "why couldn Watch "why couldn New topic

why couldn't my project run?

Ben Colorful

Joined: Aug 02, 2004
Posts: 6
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).

Adun Toridas!
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
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

Joined: Aug 06, 2004
Posts: 1
Did u save it as a .java file?
Ben Colorful

Joined: Aug 02, 2004
Posts: 6
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

Joined: Dec 10, 2001
Posts: 7023
Moving this to the IDEs and Other Tools forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Fred Grott
Ranch Hand

Joined: Oct 05, 2002
Posts: 346
Ben you are confusing main class with main method..please read this doc at this url:

MobileBytes blog - Sharing Technology - My Programming Knols
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Is your project a Java Project? Did you set the Build Path correctly (especially the source path)?

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
subject: why couldn't my project run?
It's not a secret anymore!