bin/run.sh doesn't work in a bash shell under cygwin.  The error is that James
jars are not being loaded properly.  The cause is that run.sh always uses colon
for the classpath separator, while Windows JVMs use semicolon for the classpath
separator rather than colon.  The following is a corrected run.sh to detect
running under cygwin and use a new var CLASSPATHSEP to handle the condition.
Tested under cygwin but no Unixen.

=======

#!/bin/sh
echo
echo "Avalon runner"
echo

if [ "$JAVA_HOME" = "" ] ; then
  echo "ERROR: JAVA_HOME not found in your environment."
  echo
  echo "Please, set the JAVA_HOME variable in your environment to match the"
  echo "location of the Java Virtual Machine you want to use."
  exit 1
fi

if [ ! -f Loader.jar ] ; then
  echo "ERROR: Loader.jar not found."
  echo
  echo "Please execute this 'run.sh' script from within the bin directory"
  echo "by moving to the 'bin' directory and executing './run.sh'."
  echo "If you obtained the source from CVS, build with the 'dist' target"
  echo "then copy the JAMES zip or tar file to a working directory and unbundle
it."
  exit 1
fi

if [ "$OSTYPE" = "cygwin32" ] ; then
    CLASSPATHSEP=";"
else
    CLASSPATHSEP=":"
fi

LOCAL_CLASSPATH="Loader.jar${CLASSPATHSEP}../lib/AvalonAware.jar${CLASSPATHSEP}.
./lib/xerces.jar${CLASSPATHSEP}../lib/mail_1_2.jar${CLASSPATHSEP}../lib/activati
on.jar"

$JAVA_HOME/bin/java -cp $CLASSPATH${CLASSPATHSEP}$LOCAL_CLASSPATH
org.apache.avalon.loader.Main $*



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to