Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eclipse Java Project

Status
Not open for further replies.

crmayer

Programmer
Nov 22, 2002
280
US
I have a java project with a Menu.java that has the main method in it. If you try to run the project I get an error saying:
Could not find the main class: com.tms.client.lib.Menu. Program will exit.
If you click OK, you get the message in the console window:
Exception in thread "main".

Since the error window that pops up says it is a JVM error we think that it is passing on the Main.class" to the JVM and it is not liking this, but we can not figure out why.

We tried a different JRE version and the same result.

Just for fun, we created a new project, and wrote a quick "hello world" java application, and that runs.

This is telling me it is something with this specific project.

Any ideas???
 
I was able to resolve this early this morning. I ran the project with the Debug option and it walked me right to the problem.
Believe it or not, the problem was that once of the classes was trying to use Log4j and it was not include in the build path....

Once I added that and moved it up in the list, it ran just fine.

Thanks for your response.
 
Believe me or not, log4j was not the problem. If so, the message would have been a ClassNotFoundException. Unless you didn't notice your main class had compilation errors ...

Cheers,
Dian
 
Are we trying to help or criticize actions take to fix a problem?

Where were you at before a solution was found?
 
If you allways try to solve your problems by random actions, you will loose much time and lern few.

Reading and understanding errormessages is a thing to lern - randomly trying out things (reboot, reinstall, other version) is amateur behaviour.

don't visit my homepage:
 
Being an amateur programmer, I am OK with amateur behavior. If I have your knowledge, then I guess I would be able to call myself more then just a beginner at java programming.

Thanks for you insight, I will make sure that I practice my behavior for future issues.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top