Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem using Ant
Problem using Ant [message #7736] Wed, 23 April 2003 21:01 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.wingspread.fastmail.fm

I've downloaded a project from Sourceforge which has an Ant built script.
When I try to run Ant I get an error message telling me it can't find javac
on the classpath. In the build.xml there is this line:

<echo message="java.home = ${java.home}" />

which when written to the console shows me a JRE classpath. However, in my
Eclipse preferences I've set the installed JRE to point to a JDK
installation. I also have a Windows environment variable set up to point
to the JDK not the JRE. I believe that when I installed Eclipse, it found
the JRE and set things up to point at the JRE. Grepping around some of the
files in the installation directory I see plenty of references to the old
JRE path, but I don't relish modifying these files by hand. Can someone
tell me where the system is finding ${java.home} when running Ant scripts
and how can I change it to point to the correct location?

Thanks.

--
James Howe
Re: Problem using Ant [message #7843 is a reply to message #7736] Wed, 23 April 2003 22:06 Go to previous message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
java.home is not used for this case.

Eclipse's Ant integration executes Ant in the same VM as Eclipse.

You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
preference pages.

Another option is to start Eclipse using the -vm arg so that Eclipse is
launched using your JDK install VM (your JAVA_HOME). This way Eclipse will
automatically add the tools.jar to the Ant runtime classpath.

HTH
Darins

"James Howe" <eclipse@wingspread.fastmail.fm> wrote in message
news:oprn3oozxixx2sji@news.eclipse.org...
> I've downloaded a project from Sourceforge which has an Ant built script.
> When I try to run Ant I get an error message telling me it can't find
javac
> on the classpath. In the build.xml there is this line:
>
> <echo message="java.home = ${java.home}" />
>
> which when written to the console shows me a JRE classpath. However, in
my
> Eclipse preferences I've set the installed JRE to point to a JDK
> installation. I also have a Windows environment variable set up to point
> to the JDK not the JRE. I believe that when I installed Eclipse, it found
> the JRE and set things up to point at the JRE. Grepping around some of
the
> files in the installation directory I see plenty of references to the old
> JRE path, but I don't relish modifying these files by hand. Can someone
> tell me where the system is finding ${java.home} when running Ant scripts
> and how can I change it to point to the correct location?
>
> Thanks.
>
> --
> James Howe
Previous Topic:Builder Trouble
Next Topic:Replace with newline
Goto Forum:
  


Current Time: Sat Nov 09 05:46:41 GMT 2024

Powered by FUDForum. Page generated in 0.03012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top