home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / Komercni / VAgeJava / ivj35 / setup / UPDATE.Cab / F17780_runnit < prev    next >
Text File  |  2000-07-30  |  957b  |  38 lines

  1. #!/bin/sh
  2. #
  3. # %% %%
  4.  
  5. if [ -z "${JAVA_HOME}" ] ; then
  6.     if [ -d /usr/local/java/jdk1.1.6/solaris ] ; then
  7.         JAVA_HOME=/usr/local/java/jdk1.1.6/solaris
  8.     CLASSPATH=.:/usr/local/java/jdk1.1.6/solaris/lib/classes.zip
  9.     export CLASSPATH
  10.     else
  11.         echo "JAVA_HOME environment variable not set." 1>&2 
  12.         exit 1
  13.     fi
  14. fi
  15.  
  16. # Compute an absolute pathname here because Class.getResource()
  17. # fails if $CLASSPATH contains "../".
  18. if [ -d ../../1.1_demo ] ; then
  19.     SWING_HOME=`(cd ../../1.1_classes; pwd)`
  20.     SWING_JARS=${SWING_HOME}
  21. else
  22.     SWING_HOME=`(cd ../../; pwd)`
  23.     SWING_JARS=${SWING_HOME}/swing.jar:${SWING_HOME}/motif.jar:${SWING_HOME}/multi.jar:${SWING_HOME}/windows.jar
  24. fi
  25.  
  26.  
  27. SWING_CLASSES=.:${SWING_JARS}
  28. if [ -z "$CLASSPATH" ] ; then
  29.     CLASSPATH="${SWING_CLASSES}":${JAVA_HOME}/lib/classes.zip
  30. else
  31.     CLASSPATH="${SWING_CLASSES}:$CLASSPATH"
  32. fi
  33.  
  34. CMD="${JAVA_HOME}/bin/java -classpath ${CLASSPATH} SampleTree"
  35.  
  36. echo ${CMD}
  37. ${CMD}
  38.