Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch
Per Kistler (kistlerp@ezinfo.vmsmail.ethz.ch) proposes the following solution:
Change /usr/lib/java/bin/.java_wrapper
:
INSTEAD OF:
#PRG=`type -p $0` >/dev/null 2>&1 #J_HOME=`dirname $PRG`/..NEW:
PRG=`type -p $0|awk '{print $NF}'` >/dev/null 2>&1 if [ -L $PRG ];then LS=`ls -al $PRG` PRGtmp=`echo $LS|awk '{print $NF}'` if [ `basename $PRGtmp` != ".java_wrapper" ];then PRG=$PRGtmp fi fi J_HOME_BIN=`dirname $PRG` J_HOME=`dirname $J_HOME_BIN`Therefore, the entire script looks like:
#! /bin/bash # # @(#)java_wrapper.sh 1.18 95/11/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=`type -p $0` >/dev/null 2>&1 #J_HOME=`dirname $PRG`/.. PRG=`type -p $0|awk '{print $NF}'` >/dev/null 2>&1 if [ -L $PRG ];then LS=`ls -al $PRG` PRGtmp=`echo $LS|awk '{print $NF}'` if [ `basename $PRGtmp` != ".java_wrapper" ];then PRG=$PRGtmp fi fi J_HOME_BIN=`dirname $PRG` J_HOME=`dirname $J_HOME_BIN` if [ -z "$JAVA_HOME" ] ; then export JAVA_HOME JAVA_HOME=$J_HOME fi CLASSPATH="${CLASSPATH-.}" if [ -z "${CLASSPATH}" ] ; then CLASSPATH="$J_HOME/classes:$J_HOME/lib/classes.zip" else CLASSPATH="$CLASSPATH:$J_HOME/classes:$J_HOME/lib/classes.zip" fi export CLASSPATH export LD_LIBRARY_PATH LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$J_HOME/lib/`arch`" progname=`basename $0` prog=$J_HOME/bin/`arch`/${progname} if [ -f $prog ] then eval exec $prog $opts '"$@"' else echo >&2 "$progname was not found in ${prog}" exit 1 fi
See also:
Keywords: JAVA, JAVA_WRAPPER
Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-java3
)
Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch