home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Sample.bin
/
runapplet
< prev
next >
Wrap
Text File
|
1998-06-30
|
1KB
|
38 lines
#!/bin/sh
#
if [ -z "${JAVA_HOME}" ] ; then
if [ -d /usr/local/java/jdk1.1.5/solaris ] ; then
JAVA_HOME=/usr/local/java/jdk1.1.5/solaris
CLASSPATH=.:/usr/local/java/jdk1.1.5/solaris/lib/classes.zip
export CLASSPATH
else
echo "JAVA_HOME environment variable not set." 1>&2
exit 1
fi
fi
# Compute an absolute pathname here because Class.getResource()
# fails if $CLASSPATH contains "../".
if [ -d ../../1.1_demo ] ; then
SWING_HOME=`(cd ../../1.1_classes; pwd)`
JAVADOC_HOME=`(cd ../../classes/1.1_javadoc/; pwd)`
SWING_JARS=${SWING_HOME}
else
SWING_HOME=`(cd ../../; pwd)`
JAVADOC_HOME=`(cd doc/api/; pwd)`
SWING_JARS=${SWING_HOME}/swing.jar:${SWING_HOME}/windows.jar:${SWING_HOME}/motif.jar:${SWING_HOME}/metal.jar:${SWING_HOME}/organic.jar:${SWING_HOME}/mac.jar
fi
SWING_CLASSES=.:${SWING_JARS}
if [ -z "$CLASSPATH" ] ; then
CLASSPATH="${SWING_CLASSES}":${JAVA_HOME}/lib/classes.zip:classes
else
CLASSPATH="${SWING_CLASSES}:$CLASSPATH:classes"
fi
CMD="${JAVA_HOME}/bin/java -classpath ${CLASSPATH} sun.applet.AppletViewer SwingSetApplet.html"
echo ${CMD}
${CMD}