Date: Tue, 09 Jun 1998 14:45:38 +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.980609144538.malte@webmore.com> In-Reply-To: <XFMail.980609132645.mike@vee.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>From /usr/local/jdk1.1.5/bin/java
NO_DOT_LIST="appletviewer"
DEFAULT_CLASSPATH="."
for excluded in ${NO_DOT_LIST}; do
if [ ${excluded} = ${progname} ]; then
DEFAULT_CLASSPATH="";
fi
done
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
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.
Malte.
On 09-Jun-98 Michael Gratton wrote:
>
> Hi there,
>
> Can someone tell me what the default classpath is when executing
> java/bin/java?
> More specifically, is the current directory (./ or whatever) in the default
> classpath?
>
> I'm getting "Can't find class" errors even though the specified class is in
> the
> current directory:
>
> challenger> ls
> Beanbag.class
> challenger> java Beanbag
> Can't find class Beanbag
> challenger>
>
> 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: 09-Jun-98
Time: 14:22:44
----------------------------------
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.980609144538.malte>
