Try looking in at .java_wrapper in the bin directory of the jdk/jre
installation. It sets JAVA_HOME under some conditions, and can cause
trouble. The change below cured my problem, although looking at it now,
I'm not quite sure why or how...:)
Look in .java_wrapper for
if [ -z "$JAVA_HOME" ] ; then
export JAVA_HOME
JAVA_HOME=$J_HOME
fi
and replace it with
# if [ -z "$JAVA_HOME" ] ; then
export JAVA_HOME
JAVA_HOME=$J_HOME
# fi
Brent Phillips wrote:
>
> Hi,
>
> I'm having a terrible time trying to get Ant to work. (My ultimate goal is
> to use Tomcat for Java servlets.) I've spent several days upgrading my
> RedHat Linux system to the latest everything, but I still can't get ant to
> compile or run. Any advice or suggestions are greatly appreciated. I'm a
> C++ veteran making the switch to Java, so please excuse my ignorance.
>
> As recommended in the Blackdown j2sdk and the Ant docs, I've set:
>
> export JAVA_HOME=/usr/local/jdsdk
> export ANT_HOME=$JAVA_HOME/jakarta-ant
> export CLASSPATH=.:$JAVA_HOME/lib
>
> Using the binary package and trying to run ant yields:
>
> [lyra@grzzt local]$ ant
> Couldn't find or load essential class `java/lang/Object'
> java.lang.NoClassDefFoundError java/lang/Object
> /usr/local/jdsdk/jakarta-ant/bin/ant: line 70: 1443 Aborted
> $JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS
> org.apache.tools.ant.Main $@
>
> Trying to build ant yields:
>
> lyra@grzzt jakarta-ant-src]# ./bootstrap.sh
> ... Bootstrapping Ant Distribution
> ... Compiling Ant Classes
> src/main/org/apache/tools/ant/types/Commandline.java:1: error:Cannot find
> type "org/apache/tools/ant/BuildException"
> src/main/org/apache/tools/ant/types/CommandlineJava.java:1: error:Cannot
> find type "org/apache/tools/ant/Project"
> src/main/org/apache/tools/ant/types/DataType.java:1: error:Cannot find type
> "org/apache/tools/ant/BuildException"
> src/main/org/apache/tools/ant/types/EnumeratedAttribute.java:1:
> error:Cannot find type "org/apache/tools/ant/BuildException"
> src/main/org/apache/tools/ant/types/Environment.java:1: error:Cannot find
> type "org/apache/tools/ant/BuildException"
> src/main/org/apache/tools/ant/types/FileSet.java:1: error:Cannot find type
> "org/apache/tools/ant/BuildException"
>
> (lots of other errors deleted)
>
> thanks in advance for your attention
>
> Brent Phillips
--
------------------------------------------------------------------
Douglas Guptill [EMAIL PROTECTED]
Quality Assurance Specialist 902-425-2802 x 222
thinWEB Technologies http://www.thinWEB.com