home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
jdk113
/
root
/
opt
/
jdk-1.1.3
/
bin
/
appletviewer
< prev
next >
Wrap
Text File
|
1998-08-19
|
2KB
|
83 lines
#!/bin/sh
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
# All rights reserved.
#
#
# Determine JAVA_HOME
#
if [ -z "$JAVA_HOME" ] ; then
if [ -d "/usr/java1.1" ] ; then
JAVA_HOME=/usr/java1.1
else
JAVA_HOME="`dirname \"$0\"`"
JAVA_HOME="`cd \"$JAVA_HOME\"/.. ; /bin/pwd`"
fi
fi
export JAVA_HOME
if [ ! -d "$JAVA_HOME" ] ; then
echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2
exit 1
fi
if [ -z "$CLASSPATH" ] ; then
CLASSPATH="${JAVA_HOME}/lib/classes.zip"
else
CLASSPATH="$CLASSPATH:${JAVA_HOME}/lib/classes.zip"
fi
export CLASSPATH
if [ ! -r "$JAVA_HOME/lib/classes.zip" ] ; then
if [ ! -d "$JAVA_HOME/classes" ] ; then
echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2
exit 1
fi
fi
if [ ! -r "$JAVA_HOME/lib/appletviewer.properties" ] ; then
echo "Could not read properties file: $JAVA_HOME/lib/appletviewer.properties" 1>&2
exit 1
fi
export LD_LIBRARY_PATH
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JAVA_HOME/lib"
#
# Create .hotjava directory
#
if [ ! -d "$HOME/.hotjava" ] ; then
echo "Creating $HOME/.hotjava directory"
#@cr shawnm 5 mkdir is not in /usr/bin on OpenServer. Assume it is in PATH.
mkdir -p $HOME/.hotjava
fi
#
# Parse arguments
#
prog=java
for a in "$@" ; do
case "$a" in
-debug) prog=jdb ;;
*) if ja=`expr "$a" : '-J\(..*\)'`
then jav="$jav $ja"
elif expr "$a" : '.*[\ \ ][\ \ ]*' 2>&- 1>&-
then cav="$cav \"$a\""
else cav="$cav $a"
fi ;;
esac
done
#
# Run the applet viewer
#
eval exec \"$JAVA_HOME\"/bin/$prog $jav sun.applet.AppletViewer $cav