Hi, all.
I am new to Java, though experienced in other languages, and I am not
really getting the CLASSPATH thing. Here is my exact problem:
I am trying to use an SNMP library (from Westhawk). The library tests
run fine and the example code works okay (executed via Ant). Now, I take
the library jar and try and make it work from the command-line. Javac is
not a problem and I get my class files, then create an app jar (called
disp1.jar). My problem comes when I try and run it:
(mark@locke) 11:42 $ java -cp snmp5_1.jar -jar disp1.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
uk/co/westhawk/snmp/stack/AsnOctetsPrintableFace
at java.lang.ClassLoader.defineClass0(Native Method)
<etc.>
Now, that missing class is in the snmp5_1.jar. I can unjar it and see it
in there.
So, what gives? Obviously I am not understanding something here.
Regards,

Signature
-mark. (probertm @ acm dot org)
Danno - 14 Jul 2006 01:06 GMT
> Hi, all.
>
[quoted text clipped - 22 lines]
> --
> -mark. (probertm @ acm dot org)
In the manifest file you need an entry called Class-Path: in addition
to Main-Class:
for more info go here:
http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html
By the way once you have that you can just run:
java -jar disp1.jar
Good Luck and let us know
Mark Probert - 14 Jul 2006 17:56 GMT
> In the manifest file you need an entry called Class-Path: in addition
> to Main-Class:
Many thanks, Danno. Just perfect!
Regards,

Signature
-mark. (probertm @ acm dot org)