> Hi all,
> I have a class called myclass.class
This should be named MyClass if you are following the usual
naming conventions, but I do not advise *ever* giving a class
such a generic (and stupid) name.
>...which is calling others classes in
> external.jar file.
>
> the external.jar and myClass.class
Above you stated 'myclass', now it is 'myClass'? Java is
case sensitive, so stick with the same capitalisation
throughout.
>...are both in my classpath, however java
> is not able to found the jar
>
> 1) java myClass ==> failed
In this one 'external.jar' is not on the classpath, only the
'current directory', which presumably includes myClass/MyClass
> 2) java -cp external.jar myClass ==> failed
Now 'external.jar' has been put on the classpath, but
the current directory is not.
> Accoring my understanding as both are in my classpath that shoud work
> (example 1) right ?
No.
> Any idea ?
java -cp .;external.jar MyClass
[ BTW - Please always copy/paste your output. ]
Andrew T.
> Hi all,
> I have a class called myclass.class which is calling others classes in
[quoted text clipped - 15 lines]
> Thanks for you support,
> Charlie
Charlie:
You probably need .;extenal.jar in your class path. Take a look at a
paper I just did on Java user class path and let me know if it is any help.
http://rabbitbrush.frazmtn.com/classpath.html

Signature
Knute Johnson
email s/nospam/knute/