Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Running java class from different directory

843810Feb 12 2004 — edited Feb 12 2004
Hi, this is probably simple... I want to execute a .class file a different directory from what the .class file exists. I've tried things like this:
java -classpath /usr/bin/local/tmp/ /usr/bin/local/tmp/someclass
but I only get the errors like this:
Exception in thread "main" java.lang.NoClassDefFoundError: /usr/local/tmp/someclass
What should I write for this to work?

/ ernstad
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2004
Added on Feb 12 2004
1 comment
42 views