You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2002/03/05 17:55:36 UTC

cvs commit: jakarta-avalon-excalibur/examples/jdbcdatasource/bin run.sh

leif        02/03/05 08:55:36

  Added:       examples/jdbcdatasource/bin run.sh
  Log:
  Add Unix script courtesy of Marcus Crafter
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/examples/jdbcdatasource/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/jdbcdatasource.jar
  
  #echo $CP
  
  # Run the example application
  $JAVACMD -classpath $CP org.apache.avalon.examples.jdbcdatasource.Main $@
  
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>