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

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