ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Chow" <>
Subject RE: ANT BUILD ERROR : suns class files not found
Date Wed, 25 Jun 2003 14:26:23 GMT
Instead of adding this PATH=$PATH:$JAVA_HOME/bin, use PATH=$JAVA_HOME/bin:$PATH instead so
your version of Java will appear first in the search path.

-----Original Message-----
From: rebel student []
Sent: Wednesday, June 25, 2003 10:23 AM
Subject: ANT BUILD ERROR : suns class files not found

hi folks,
last time I was able to build ant for an application,
but  that I did with another machine. I have installed
Red Hat 9 on my laptop and also downloaded jdk needed
from the 
I have checkedout ant module via the CVS from the
apache-ant site.
when I try to run, ./ install I get the
following error:

[root@localhost ant]# ./ install
Warning: JAVA_HOME environment variable not set.
  If build fails because sun.* classes could not be
  you will need to set the JAVA_HOME environment
  to the installation directory of java.
Error: JAVA_HOME is not defined correctly.
  We cannot execute java
Bootstrap FAILED


I guess that the problem may be the following:

I have set up the 
JAVA_HOME environment variable correctly. i.e. 
and have added PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
However, when I open a new shell and type java
-version in that it gives

java version "1.3.1"
jdkgcj 0.2.3 (
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying
conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR

However, if I go to /usr/local/jdk1.3.1_08/bin and
type java -version I get

java version "1.3.1_08"
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.3.1_08-b03)
Java HotSpot(TM) Client VM (build 1.3.1_08-b03, mixed

This should appear if I type java -version in any
directory since I have added that path. Seems, that
java installed with the Red Hat 9 is overiding it. I
looked it in the packages with 
redhat-config-packages so that I could uninstall it
but I could not find a package name for java installed
in my systems in the developments section.
Can someone tell me how to stop this overiding, in
fact  I want to uninstall this open source java and
use only the sun distribution for linux. I think, If I
am able to do this, I will be able to successfully
build the ant.


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message