#!/bin/sh # -*- ksh -*- # $Id: std-header.sh,v 1.7.2.1 2003/03/05 13:30:16 tcanavan Exp $ # Standard settings #---------------------------------------- # set -x thisprog=`basename $0` progdir=`dirname $0` cd $progdir/.. BASE=`pwd` optjre="-Dlog4j.configuration=file:$BASE/config/log4j.cf" # Set system-dependant options #---------------------------------------- OS=`uname` case $OS in SunOS) optNoJIT="-Djava.compiler=NONE" optJIT="" # # The following is set to avoid a memory leak when # running on SOLARIS 8 and displaying on a remote # X Server. # # See the following bug for details: 4641535 # # http://developer.java.sun.com/developer/bugParade/bugs/4641535.html # J2DFONTSCALER=t2k export J2DFONTSCALER ;; Linux) optNoJIT="" optJIT="" # From the RedHat 7.1 release notes: # Some Java JVMs (both from Sun and IBM) don't work with the # new floating stack feature of the i686 version of glibc. # The failures are due to programming assumptions in the JVMs # that are now invalid. JVM vendors are working on making # the necessary corrections. Until corrected JVM packages # are available, you may force glibc to use the deprecated # stack model by setting the following environment variable: # LD_ASSUME_KERNEL=2.2.5 LD_ASSUME_KERNEL=2.2.5 ; export LD_ASSUME_KERNEL # RedHat 7.1 ;; HP-UX) optNoJIT="" optJIT="" ;; *) echo 'Usupported OS: $OS' ; exit 1 ;; esac # -*- ksh -*- # $Id: std-usage.sh,v 1.4 2002/05/27 15:18:02 amchavan Exp $ # Usage strings #---------------------------------------- usage="usage: $thisprog \nwhere are: \n\t-v\tLoad Java classes in verbose mode \n\t-help\tDisplay this help text \n\t-32\tAllow heap to grow to 32 MB \n\t-128\tAllow heap to grow to 128 MB \n\t-info\tDisplay run-time information \n\t-debug\tDisplay run-time and debugging information " # Set default options and process # command line switches #---------------------------------------- optHeap=64 # by default, heap is 64 meg optDebug=N # by default no debugging options options=$* # save user options posargs="" # positional args we don't know anything about while true; do # Loop over input options # Terminate when no more user options opt=$1 ## echo "opt=$opt" if [ -z "$opt" ] ; then break fi case $opt in -32) optHeap=32 ;; -128) optHeap=128 ;; -debug) optDebug=Y ; optjre="$optjre -Dlog.level=DEBUG";; -info) optDebug=Y ; optjre="$optjre -Dlog.level=INFO";; -v) optjre="$optjre" ;; # save all other options, we don't know anything about them *) posargs="$posargs $opt" ;; esac shift done # Rebuild list of positional parameters # with all command line switches we don't # know anything about # ---------------------------------------- ## echo "posargs=$posargs" eval set -- $posargs optjre="$optjre -mx${optHeap}m" # for (eg) paramfile Parameters if [ $optDebug = "N" ] ; then optjre="$optjre $optJIT" else optjre="$optjre -Ddebug.mode=true $optNoJIT" fi # -*- ksh -*- # $Id: mt-usage.sh,v 1.1.2.1 2003/02/20 08:43:48 tcanavan Exp $ # Give up if DISPLAY variable is not set #---------------------------------------- if [ -z "$DISPLAY" ]; then echo "DISPLAY environment variable not set - exiting" exit 1 fi optjre="$optjre -Dorg.eso.ohs.bob.vltroot=$VLTROOT" # Needed by BOB interface usage="$usage \n\t-noccs\tTurn off connection to CCS " while true; do # Loop over input options opt=$1 case $opt in -noccs) optjre="$optjre -Dccs.wanted=false" ;; -*) echo $usage ; exit ;; # trap all other options *) break ;; esac shift done # -*- ksh -*- # $Id: std-setup-jre.sh,v 1.5 2002/11/04 14:05:46 nkornwei Exp $ #---------------------------------------- # Accommodate standard DFS, VLT setup #---------------------------------------- if [ -z "$DATAFLOW_JAVA" ] ; then cd $BASE DATAFLOW_JAVA=`pwd` fi if [ -z "$DATAFLOW_DIR" ] ; then cd $BASE/../.. DATAFLOW_DIR=`pwd` fi if [ -z "$DFS_EXTERNAL" ] ; then DFS_EXTERNAL=external fi if [ -z "$SWING_HOME" ] ; then SWING_HOME=$DATAFLOW_DIR/$DFS_EXTERNAL/lib fi if [ -z "$VLTSW_ROOT" ] ; then VLTSW_ROOT=$VLTROOT/.. fi #---------------------------------------- # Find out which JRE we use #---------------------------------------- # # Set the JRE executable: "jre" for pre java1.2, else "java" JREEXE=java if [ -x $BASE/../jre/bin/$JREEXE ] ; then # We prefer the locally installed JRE #---------------------------------------- cd $BASE/../jre JREBASE=`pwd` elif [ -n "$JAVA_HOME" ] ; then # Use the VLT standard installation #---------------------------------------- JREBASE=$JAVA_HOME else jre=`which $JREEXE` if [ -x $jre ] ; then # Use the system-wide installation #---------------------------------------- cd `dirname $jre`/.. JREBASE=`pwd` else # Give up! #---------------------------------------- echo "No Java Runtime Environment found: exiting" exit 1 fi fi JRE=$JREBASE/bin/$JREEXE # # Check the Java version. # TO MODIFY THE JAVA VERSION EDIT THE VERSION # NUMBER IN THE grep COMMAND BELOW: # $JRE -version 2>&1 | grep 1.4 > /dev/null ISCORRECTJAVAVER=$? if [ $ISCORRECTJAVAVER -ne 0 ] ; then # This is not the correct java version #---------------------------------------- echo "The $JRE command is not Java 1.4: exiting" exit 1 else # OK, this is the correct version echo "The $JRE command confirmed as Java 1.4" fi cd $BASE # just in case # -*- ksh -*- # $Id: std-classpath.sh,v 1.11 2002/11/07 12:32:04 nkornwei Exp $ # Setup CLASSPATH for different # runtime environments #---------------------------------------- oldcpath=$CLASSPATH CLASSPATH=$JREBASE/lib/classes.zip CLASSPATH=$CLASSPATH:$JREBASE/lib/rt.jar # We look for our classes first in the local directory tree, then in # the JAR files. In fact, the local .class files are at least as # up-to-date as the archived ones. # amchavan, 11-Jan-2002 CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/OHS # The following line is edited by the Makefile # and the proper JAR file is substituted CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/mt-all.jar CLASSPATH=$CLASSPATH:$SWING_HOME/swingall.jar # VLT stuff # CLASSPATH=$CLASSPATH:$VLTSW_ROOT/CCSLite/java CLASSPATH=$CLASSPATH:$VLTSW_ROOT/CCSLite/lib/Ccs.jar # External libraries CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/swingall.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/jConnect40.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/gnu-regexp.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/jpython.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/jacl.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/tcljava.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/barApp.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/KavaChartBeans.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/log4j.jar CLASSPATH=$CLASSPATH:$DATAFLOW_DIR/$DFS_EXTERNAL/lib/collections.jar # Now accommodate non-Dataflow installations CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/swingall.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/jConnect40.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/gnu-regexp.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/jpython.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/jacl.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/tcljava.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/barApp.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/KavaChartBeans.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/log4j.jar CLASSPATH=$CLASSPATH:$DATAFLOW_JAVA/lib/collections.jar CLASSPATH=$CLASSPATH:$oldcpath export CLASSPATH # Patch for Linux -- environment variable CLASSPATH # is ignored by the IBM 1.1.8 Java runtime if [ $OS = "Linux" ] ; then optjre="$optjre -classpath $CLASSPATH" ; fi # Set shared library pathnames for # all supported flavors of Unix #---------------------------------------- SHLIB_PATH=${BASE}/lib:$SHLIB_PATH LD_LIBRARY_PATH=${BASE}/lib:$LD_LIBRARY_PATH export SHLIB_PATH export LD_LIBRARY_PATH # -*- ksh -*- # $Id: std-debugout.sh,v 1.1 2001/10/18 12:19:10 amchavan Exp $ # Print out some useful information #---------------------------------------- if [ $optDebug = "Y" ] ; then echo "$NOW date: `date`" echo "$NOW DATAFLOW_DIR: $DATAFLOW_DIR" echo "$NOW DATAFLOW_JAVA: $DATAFLOW_JAVA" echo "$NOW DFS_EXTERNAL: $DFS_EXTERNAL" echo "$NOW SWING_HOME: $SWING_HOME" echo "$NOW JRE: $JRE" echo "$NOW BASE: $BASE" echo "$NOW options: $options" echo "$NOW optjre: $optjre" if [ -z "$RTAPENV" ] ; then r="" else r=$RTAPENV fi echo "$NOW RTAPENV: $r" echo "$NOW CLASSPATH:" echo $CLASSPATH | tr ":" "\n" echo "$NOW SHLIB_PATH:" echo $SHLIB_PATH | tr ":" "\n" echo "LD_LIBRARY_PATH:" echo $LD_LIBRARY_PATH | tr ":" "\n" fi # -*- ksh -*- # $Id: mt-start.sh,v 1.1.2.1 2003/02/20 08:43:48 tcanavan Exp $ cd $BASE eval $JRE $optjre org.eso.ohs.phase2.apps.masktracker.MaskTracker