My guess is this, you don't have your classpath set.
Make sure you have the following in your CLASSPATH environment
variable.
Path to the JDK classes. Path to any external jar files you might use (ie
swing.jar)
Path to your development tree (Ie for me it is the root of my jclass hierarchy)
Finally a . , to get classes with no package in your current directory.
IE, my classpath is usually somthing like
CLASSPATH="d:/sdk/jdk1.1.6/lib/classes.zip;d:/special/swing.jar;e:/mydevt;."
This will probably solve both of the problems you describe.
../Martin
Aaron Brick wrote:
> my JDK installation seems to be weird. i saw a previous post relevant to
> this problem in the archive but the responses i saw weren't helpful.
>
> when i do "java HelloWorld.class" it complains about not being able to
> find the class file - even if i pass the full path - until i do a
> "-classpath `pwd`", or its equivalent. is this normal behavior?
>
> then - this is the step i have not been able to solve - it complains about
> not being able to find a class file called "java/lang/Thread". well, i
> have tried a large number of things with the Thread.class file, including
> renaming it and putting its path in classpath, putting it in ad-hoc
> subdirs in the java/classes dir (where i'm trying all this), etc. i just
> can't get it to find the file.
>
> i mailed one member of this list and he told me to download some different
> classes.zip file - however, it didn't appear to be on the russian server
> he gave me. why the discrepancy, and what is the deal with this problem,
> anyone?
>
> i have:
>
> JDK 1.1.6v2, glibc, i386 on Debian 2.0 (2.0.34), libc6. i don't have my
> machine handy so i'm sorry i don't have the loader or X versions but i can
> certainly supply them later.
>
> i would say this problem is of fairly high severity because it prevents me
> from running any program at all! it may be that it is an isolated incident
> but i sure thought the install went fine and my system is not weirdly
> hacked or anything.
>
> thanks for your responses.
>
> aaron brick.
>