Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Problem starting from command line

Started by mrhodes Dec 21, 2004 at 2:07 PM 1 replies 750+ views
Original Post
mrhodes
mrhodes
Hello everyone... I'm working on a server program, and I have no problem running it from the IDE I use, Eclipse... however, if I go to the commandline and run it, I get the following error: "Exception in thread "main" java.lang.NoClassDefFoundError: Server/class" Can anyone help me with this... I'm sure it's soemthing stupid I'm doing... Like I said, it does work when I run it from Eclipse... Thanks a lot Mike
Michael RhodesTiger Studios Web Designhttp://tigerstudios.net
SamLowry
SamLowry
Had a lot of problems myself to run java apps from the command line.
You haven't given me a lot information, so here are some general points:

* don't specify the .class suffix
* if your main class (the one containing the main method) is in a package, don't forget to fully qualify the main class name (such as "server.App", not "App")
* be sure to launch it from the right directory. Let's say your main class resides in the c:\programming\java\server\ directory, you must go to c:\programming\java directory and start your app from there.

mrhodes
mrhodes
Excellent!!!!

Thanks, I was using Server.class to run it.... took out the .class and it worked :)

I knew it was something stupid like that..

Thanks for the help

Mike
Michael RhodesTiger Studios Web Designhttp://tigerstudios.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.