10 LOCATION=${LOCATION%/*}
13 COMMAND=${COMMAND##*/}
15 if [ -z "$JAVA_HOME" ] ; then
16 echo "ERROR: JAVA_HOME environment variable is not set."
19 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
20 # IBM's JDK on AIX uses strange locations for the executables
21 JAVACMD=$JAVA_HOME/jre/sh/java
23 JAVACMD=$JAVA_HOME/bin/java
27 if [ ! -x "$JAVACMD" ] ; then
28 echo "Error: JAVA_HOME is not defined correctly."
29 echo " We cannot execute $JAVACMD"
33 LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip
35 # add in the dependency .jar files from the lib directory
36 LIBS=$LOCATION/../lib/*.jar
39 # if the directory is empty, then it will return the input string
40 # this is stupid, so case for it
41 if [ "$i" != "${LIBS}" ] ; then
42 LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
49 "$JAVACMD" '-classpath' "$LOCALCLASSPATH" 'edu.internet2.middleware.shibboleth.common.attribute.AttributeAuthorityCLI' "$@"