home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / Komercni / VAgeJava / ivj35 / setup / IDE.Cab / F8693_runnit < prev    next >
Text File  |  2000-07-30  |  976b  |  40 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. cd classes
  17.  
  18. # Compute an absolute pathname here because Class.getResource()
  19. # fails if $CLASSPATH contains "../".
  20. if [ -d ../../../1.1_demo ] ; then
  21.     SWING_HOME=`(cd ../../../1.1_classes; pwd)`
  22.     SWING_JARS=${SWING_HOME}
  23. else
  24.     SWING_HOME=`(cd ../../../; pwd)`
  25.     SWING_JARS=${SWING_HOME}/swing.jar:${SWING_HOME}/motif.jar:${SWING_HOME}/multi.jar:${SWING_HOME}/windows.jar
  26. fi
  27.  
  28. SWING_CLASSES=.:${SWING_JARS}
  29. if [ -z "$CLASSPATH" ] ; then
  30.     CLASSPATH="${SWING_CLASSES}":${JAVA_HOME}/lib/classes.zip
  31. else
  32.     CLASSPATH="${SWING_CLASSES}:$CLASSPATH"
  33. fi
  34.  
  35. CMD="${JAVA_HOME}/bin/java -classpath ${CLASSPATH} SwingSet"
  36.  
  37. echo ${CMD}
  38. ${CMD}
  39.  
  40.