>
>
>
> > Your java interpreter is not able to find org.apache.tools.ant.Main
> class.
> > You have to add ant.jar to classpath when you run the java.
>
> > Can you provide the full command which throws this exception?
I have used the folllowing command which is actually a script
[r...@localhost ~]# /shibboleth-identityprovider-2.1.2/install.sh.And
the content of the install.sh script is :
#! /bin/sh
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true ;;
esac
#Find the necessary resources
ANT_HOME=.
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
else
JAVACMD=java
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit
fi
if [ -n "$CLASSPATH" ] ; then
LOCALCLASSPATH=$CLASSPATH
fi
# add in the dependency .jar files
DIRLIBS=${ANT_HOME}/src/installer/lib/*.jar
for i in ${DIRLIBS}
do
# if the directory is empty, then it will return the input string
# this is stupid, so case for it
if [ "$i" != "${DIRLIBS}" ] ; then
if [ -z "$LOCALCLASSPATH" ] ; then
LOCALCLASSPATH=$i
else
LOCALCLASSPATH="$i":$LOCALCLASSPATH
fi
fi
done
if [ -n "$JAVA_HOME" ] ; then
if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
fi
if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
fi
# OSX hack to make Ant work with jikes
if $darwin ; then
OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
if [ -d ${OSXHACK} ] ; then
for i in ${OSXHACK}/*.jar
do
JIKESPATH=$JIKESPATH:$i
done
fi
fi
else
echo "Warning: JAVA_HOME environment variable is not set."
echo " If build fails because sun.* classes could not be found"
echo " you will need to set the JAVA_HOME environment variable"
echo " to the installation directory of java."
fi
# supply JIKESPATH to Ant as jikes.class.path
if [ -n "$JIKESPATH" ] ; then
if [ -n "$ANT_OPTS" ] ; then
ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
else
ANT_OPTS=-Djikes.class.path=$JIKESPATH
fi
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
fi
$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS
org.apache.tools.ant.Main -e -f src/installer/resources/build.xml "$@"
>
>
>
> How did you install java and ant?
>
>
>
i have installed ant using the command : yum install ant* ;
and java using jdk.bin file execution.
Also ant is working fine with other script ie I am able to successfully
compile other java project except this one using ant .
_______________________________________________
To unsubscribe, email [email protected] with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc