K.R. Foley writes:
> Steve wrote:
>
> > I need some help configuring my classpath.I can javac on file it
> > works fine ie:javac hello.javathis creates the .class file. Then when
> > I try and runjava hellothe error I get is:can't find class helloI can
> > see the hello.class file!? Here is a listing of my current classpath
> >
>settings:...CLASSPATH=/usr/lib/jdk-1.1.5/lib/classes.zip......JAVA_HOME=/usr/lib/jdk-1.1.5JDK_HOME=/usr/lib/jdk-1.1.5......all
> > of these locations are correct...what else could it be?I have set java
> > up on a number of platforms and all of this appears to be
> > correct...~shrug~... [EMAIL PROTECTED]
>
> Several other people have already mentioned this but I can see clearly
> in your e-mail that you do not have a "." in your classpath. The "."
> would indicate to also look in your current directory for classes. You
> can probable see an example of this by checking you PATH variable in
> your environment, as in "echo $PATH".
Here's the scoop:
If you do not have CLASSPATH set at all, the java wrapper script assumes that
you are just doing simple hacking around, and puts "." the CLASSPATH it passes
to the java interpreter on your behalf.
If you have CLASSPATH set, it assumes that you know what you are doing (not
always the case) and so does not gratuitously put "." in for you.
Steve