#!/bin/sh
#
#     @(#)java_wrapper.sh	1.14 95/10/14
#
#=================================================================
#    STOP - THIS SCRIPT AND JAVA WILL NOT RUN AT ALL UNDER
#    SUNOS4.X, AKA SOLARIS 1.X.  
#
#    The problem is not with the shell used the run this script -
#    the binary software will simply not run at all under Sunos
#    4.x.  I am sorry if you missed earlier warnings and have
#    downloading this software expecting it to run on SUNOS 4.x.  A
#    port to the SUNOS 4.x platform is underway and will be
#    publically released as soon as we have it available.  For the
#    latest information see our home page at http://java.sun.com/
#=================================================================

# Set up default variable values if not supplied by the user.

PRG=`which $0` >/dev/null 2>&1
J_HOME=`dirname $PRG`/..

if [ ! -d "$J_HOME" ] ; then
      echo "Invalid J_HOME: $J_HOME" 1>&2 
      exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
    export JAVA_HOME
    JAVA_HOME=$J_HOME
fi

export CLASSPATH
if [ -z "$CLASSPATH" ]
then
    CLASSPATH="."
fi

CLASSPATH="$CLASSPATH:$J_HOME/classes:$J_HOME/classes.zip"

export LD_LIBRARY_PATH
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$J_HOME/lib/i586"
      
progname=`basename $0`
prog=$J_HOME/bin/`arch`/${progname}

if [ -f $prog ]
then
    #echo eval exec $prog $opts '"$@"'
		#printenv
    eval exec $prog $opts '"$@"'
else
    echo >&2 "$progname was not found in ${prog}"
    exit 1
fi
