home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
runnit
< prev
next >
Wrap
Text File
|
1998-05-08
|
1KB
|
42 lines
#!/bin/sh
#
# @(#)runnit 1.4 98/01/31
#
# runnit script for Metalworks
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
cd classes
# 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)`
SWING_JARS=${SWING_HOME}
else
SWING_HOME=`(cd ../../../; pwd)`
SWING_JARS=${SWING_HOME}/swing.jar:${SWING_HOME}/windows.jar:${SWING_HOME}/motif.jar:${SWING_HOME}/mac.jar
fi
SWING_CLASSES=.:${SWING_JARS}
if [ -z "$CLASSPATH" ] ; then
CLASSPATH="${SWING_CLASSES}":${JAVA_HOME}/lib/classes.zip
else
CLASSPATH="${SWING_CLASSES}:$CLASSPATH"
fi
CMD="${JAVA_HOME}/bin/java -classpath ${CLASSPATH} Metalworks"
echo ${CMD}
${CMD}