Newbie Another NoClassDefFoundError (bot not a .class call error !)

L

Lilian BRUN

i get mad, i'm trying to make a cron in java, and i get NoClassDefFoundError

here's the problem :
I succesfully compile using the command :
javac /Users/lbrun/bot/botEfarm.java
Then i execute it :
java /Users/lbrun/bot/botEfarm
Exception in thread "main" java.lang.NoClassDefFoundError:
/Users/lbrun/bot/botEfarm

But if i call directly in the directory it works :
cd /Users/lbrun/bot/botEfarm
java botEfarm
->Succes

Thanks in advance to help me on this certainly very easy issue....

Best regards
 
P

Paul Tomblin

In a previous article said:
Then i execute it :
java /Users/lbrun/bot/botEfarm

You can't give paths to the class like that. You have to just give the
class name, and make sure the class is in the classpath:

java -cp /Users/lbrun/bot botEfarm
 
L

Lilian BRUN

It was it !
Thanks.
You can't give paths to the class like that. You have to just give the
class name, and make sure the class is in the classpath:

java -cp /Users/lbrun/bot botEfarm

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top