[2604] in java-interest
Re: Problem with classpath
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Thu Oct 5 21:49:01 1995
Date: Thu, 5 Oct 1995 16:49:50 -0700
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: sid.conklin@nora.stanford.edu
Cc: java-interest@java.Eng.Sun.COM
Hi Sid,
> I'm compiling a class in the following manner:
>
> >javac -classpath ~/kerberos/classes:~/hotjava/JDK/classes
> classsrc/Credential.java
>
> I get an error saying it can't find a dependent class, KrbConstants. After
> playing around with it, it appears that javac is not paying attention to the
> second path argument. If I move the import around like the following:
>
> import krb.*;
> import java.lang.*;
>
> javac will understand where krb.KrbConstants lives but know java.lang.*. If I
> change the classpath argument to the following:
>
> >javac -classpath ~/hotjava/JDK/classes:~/kerberos/classes
> classsrc/Credential.java
>
> Then javac can't find the KrbConstants class. I've also tried the same test
> with CLASSPATH with the same results.
>
> Help!
You should execute the compiler as follows:
javac -classpath ~/kerberos/classes:~/hotjava/JDK/classes\
krb/Credential.java
Note that the classes in a package need to be in the appropriate
directory and that the compiler should be called with the directories
in it. The compiler looks in the "krb" directory for the classes in
that package.
Have fun,
Arthur van Hoff
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com