Thank you Derek, I will try to use your idea and Ill give you a feedback! And yes, you are right, even though everything is set up, the JAVA_HOME, for the JDK directory, ANT still doesn't seem to find the correct path, I have no idea why does this JRE appears, since it is not mentioned before in any PATH or JAVA_HOME
Cheers -- David Nemer Sent from Kaiserslautern, RP, Germany On Thu, May 14, 2009 at 4:28 PM, Cole, Derek E <derek.e.c...@lmco.com>wrote: > When I had this problem, I KNOW that JAVA_HOME was set correctly. I > still ran into the problem. The OP here also said JAVA_HOME was set > correctly. There is some missing step here that prevents the ant Project > instance from knowing which Java to use. > > -----Original Message----- > From: Ashley Williams [mailto:ashpub...@mac.com] > Sent: Thursday, May 14, 2009 9:56 AM > To: Ant Users List > Subject: Re: Java in JDK but ANT can't find it! > > It looks like you are pointing to the jre not the jdk. > Try repointing the JAVA_HOME environment variable to the jdk directory > instead, > > > On 14 May 2009, at 13:15, David Nemer wrote: > > > Hello Everyone, > > > > I am running ANT programmatically in JAVA. So, my task is to build the > > BUILD.XML. > > I'm able to do so, but it throws an exception saying: > > > > /scratch2/nemer/test/xfire/build.xml:5: The following error occurred > > while > > executing this line: > > /scratch2/nemer/test/xfire/build-common.xml:81: Unable to find a javac > > compiler; > > com.sun.tools.javac.Main is not on the classpath. > > Perhaps JAVA_HOME does not point to the JDK. > > It is currently set to "/opt/jdk1.6.0_06/jre" > > > > But in the end it says: BUILD SUCCESSFUL (but it still throws that > > exception). > > > > I already set all of my environment variables to /opt/jdk1.6.0_06/ > > (JAVA_HOME and also in PATH), which is a JDK! And even on the error > > message > > it says that the java is set to /opt/jdk1.6.0_06/jre (which is a > > JDK, I > > don't know where it gets the jre from). > > > > So, does any one know how can I solve this problem? Is there a > > configuration > > file in ANT that we need to set up! I'm stuck there!! > > > > I'm running the ant 1.7.1. > > > > Cheers, > > -- > > David Nemer > > Sent from Saarbrucken, SL, Germany > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > >