Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 1998 11:54:48 +0200 (CEST)
From:      Malte Lance <malte@webmore.com>
To:        Michael Gratton <mike@vee.net>
Cc:        freebsd-java@FreeBSD.ORG
Subject:   RE: "Can't find class" errors
Message-ID:  <XFMail.980610115448.malte@webmore.com>
In-Reply-To: <XFMail.980610092543.mike@vee.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 09-Jun-98 Michael Gratton wrote:
> 
> On 09-Jun-98 Malte Lance wrote:
>>From /usr/local/jdk1.1.5/bin/java
>>
>> [snip] 
>> 
>> This means, if you are calling appletviewer, "." is NOT in your CLASSPATH.
>> Otherwise it will be if you set CLASSPATH in your environment to include it.
> 
> Yep, that's fine, but I'm referring to java, not appletviewer. I don't have
> the
> source on me here, so can someone have a look and tel me what the default
> classpath used bin/java?

/usr/local/jdk1.1.5/bin/java is the wrapper for the java-bin.
View it on your own:

DEFAULT_CLASSPATH="."

..

CLASSPATH="${CLASSPATH:-${DEFAULT_CLASSPATH}}"
if [ -z "${CLASSPATH}" ] ; then
    CLASSPATH="$JAVA_HOME/classes:$JAVA_HOME/lib/classes.jar:$JAVA_HOME/lib/rt.j
ar:$JAVA_HOME/lib/i18n.jar:$JAVA_HOME/lib/classes.zip"
else
    CLASSPATH="$CLASSPATH:$JAVA_HOME/classes:$JAVA_HOME/lib/classes.jar:$JAVA_HO
ME/lib/rt.jar:$JAVA_HOME/lib/i18n.jar:$JAVA_HOME/lib/classes.zip"
fi

That means, if you did not set CLASSPATH at all in your environment, "." will be
in your CLASSPATH, as long as you do not call the applet with appletviewer 
(=> call your applet with "java" and "." will be in your CLASSPATH if your
CLASSPATH is not set in your environment).
If you set CLASSPATH to something in your environment, it depends on you,
whether you included "." in your CLASSPATH or not.
In any case 
  $JAVA_HOME/classes:$JAVA_HOME/lib/classes.jar:
  $JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/i18n.jar:
  $JAVA_HOME/lib/classes.zip
will be appended to your CLASSPATH. JAVA_HOME defaults to the install-directory
of your jdk-1.1.5

Malte

> 
> Thanks,
> Mike.
> 
> * Mike Gratton - mike@vee.net
> !   "I'd rather be anywhere doing anything"
> $ http://www.vee.net/
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message

----------------------------------
E-Mail: Malte Lance <malte@webmore.com>
Date: 10-Jun-98
Time: 10:37:07
----------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980610115448.malte>