avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/examples/altprofile/bin run.sh
Date Tue, 05 Mar 2002 16:55:25 GMT
leif        02/03/05 08:55:25

  Added:       examples/altprofile/bin run.sh
  Log:
  Add Unix script courtesy of Marcus Crafter
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/examples/altprofile/bin/run.sh
  
  Index: run.sh
  ===================================================================
  #!/bin/bash
  #
  # Startup script.
  #
  
  #
  # Determine if JAVA_HOME is set and if so then use it
  #
  if [ -z "$JAVA_HOME" ] ;  then
    JAVA=`which java`
    if [ -z "$JAVA" ] ; then
      echo "Cannot find JAVA. Please set your PATH."
      exit 1
    fi
    JAVA_BINDIR=`dirname $JAVA`
    JAVA_HOME=$JAVA_BINDIR/..
  fi
  
  if [ "$JAVACMD" = "" ] ; then
     # it may be defined in env - including flags!!
     JAVACMD=$JAVA_HOME/bin/java
  fi
  
  # Main.java has hard coded config values so this script must be run from 
  # altprofile/bin (any better ideas ?)
  EXAMPLE_HOME=../..
  
  #
  # Build the runtime classpath
  #
  for i in ${EXAMPLE_HOME}/commonlib/*.jar ; do
      CP=${CP}:$i
  done
  
  CP=${CP}:../lib/altprofile.jar
  
  #echo $CP
  
  # Run the example application
  $JAVACMD -classpath $CP org.apache.avalon.examples.altprofile.Main $@
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message