#!/bin/sh
#
# This is an example that VRwave can also run as Applet
# under the Java VM of Java-capable webbrowsers (e.g. netscape)
#
# The script sets CLASSPATH and LD_LIBRARY_PATH accordingly,
# and starts netscape on the file samplens.html
#
# See "vrwave" for necessary VRWAVE_HOME and CPU settings.
#
# created: mpichler, 19970606
# changed: mpichler, 19970606

classfile=${VRWAVE_HOME?}/classes/vrwave.zip
if [ ! -f $classfile ]
then
  echo "vrwave error: vrwave.zip not found"
  exit 1
fi

CLASSPATH=$classfile:$CLASSPATH
export CLASSPATH
# echo "CLASSPATH: $CLASSPATH"

LD_LIBRARY_PATH=$VRWAVE_HOME/lib/${CPU?}:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
# echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"

SHLIB_PATH=$VRWAVE_HOME/lib/${CPU?}:$SHLIB_PATH
export SHLIB_PATH
# echo "SHLIB_PATH: $SHLIB_PATH"

# run netscape
echo netscape ${1+"$@"} samplens.html
exec netscape ${1+"$@"} samplens.html
