Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Ant, Eclipse Config and JRE
Ant, Eclipse Config and JRE [message #43262] Thu, 29 May 2003 17:27 Go to next message
Eclipse UserFriend
Originally posted by: dougr.rmsfinance.com

When I attempt to use ExternalTools:Ant to compile, I get the following
error:
"[javac] BUILD FAILED: file:H:/eclipse/workspace/.../build.xml:118: 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"

Relevant Info:
[1] running Eclipse version 2.1 on Windows 2000
[2] Java_Home is set to the JDK directory: E:\j2sdk1.4.1_01
[3] when I execute an Ant Echo Task in Eclipse ( <echo message="java.home
= ${java.home}"/> ), it does indicate that java.home points to the JRE
instead: E:\j2sdk1.4.1_01\jre,
[4] I can see that Eclipse gets its information from the Windows Registry
rather than the Windows Environment variables [JAVA_HOME] that Tomcat, Ant
and other java-based programs use. There are JAVAHOME keys for the JDK
and the JRE. I have [a] verified that the JDK and JRE keys point to the
correct locations.

And [b] I have tried to change the JRE key. When I make this change,
Eclipse fails to launch. So I had to change it back.

[5] Environment Variable - Classpath - does contain entry for Tools.jar
which holds the class - com.sun.tools.javac.Main - Ant needs.


How do I configure Eclipse to tell it where Java_Home is so that Ant can
find the class in Tools.jar it needs to compile?

Regards,

Douglas Reames
RMS Finance
919 929 3465
Re: Ant, Eclipse Config and JRE [message #43463 is a reply to message #43262] Thu, 29 May 2003 18:57 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Please do not crosspost...
Answered in the correct forum: eclipse.platform

Darins

"douglas reames" <dougr@rmsfinance.com> wrote in message
news:bb5fut$a4s$1@rogue.oti.com...
> When I attempt to use ExternalTools:Ant to compile, I get the following
> error:
> "[javac] BUILD FAILED: file:H:/eclipse/workspace/.../build.xml:118: 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"
>
> Relevant Info:
> [1] running Eclipse version 2.1 on Windows 2000
> [2] Java_Home is set to the JDK directory: E:\j2sdk1.4.1_01
> [3] when I execute an Ant Echo Task in Eclipse ( <echo message="java.home
> = ${java.home}"/> ), it does indicate that java.home points to the JRE
> instead: E:\j2sdk1.4.1_01\jre,
> [4] I can see that Eclipse gets its information from the Windows Registry
> rather than the Windows Environment variables [JAVA_HOME] that Tomcat, Ant
> and other java-based programs use. There are JAVAHOME keys for the JDK
> and the JRE. I have [a] verified that the JDK and JRE keys point to the
> correct locations.
>
> And [b] I have tried to change the JRE key. When I make this change,
> Eclipse fails to launch. So I had to change it back.
>
> [5] Environment Variable - Classpath - does contain entry for Tools.jar
> which holds the class - com.sun.tools.javac.Main - Ant needs.
>
>
> How do I configure Eclipse to tell it where Java_Home is so that Ant can
> find the class in Tools.jar it needs to compile?
>
> Regards,
>
> Douglas Reames
> RMS Finance
> 919 929 3465
>
>
>
>
>
Re: Ant, Eclipse Config and JRE [message #43955 is a reply to message #43262] Fri, 30 May 2003 01:34 Go to previous message
Eclipse UserFriend
Originally posted by: yongw2.21cn.com

I have asked the same question just a few days ago, see the forwared
message:

-------------------------------------
I think it's enough to add tools.jar (from your JDK/lib directory) to ant
classpath in Eclipse (Window/Preferences/Ant/Runtime/Classpath/Add JARs...)
peter

"Yong WANG" <yongw2@21cn.com> wrote in message
news:bauq51$5sq$1@rogue.oti.com...
> I have installed Eclipse 2.1 on Win2k, the ANT plugin is version 1.5.2.
> I also installed ANT 1.5.3 for command line use.
>
> When I use "javac" task in one build.xml file, all goes smoothly in
command
> line. But if i use it in the Eclipse environment, i always get the error
> message
> "[javac] BUILD FAILED:
> file:G:/eclipse/workspace/jtmn/src/jasn/parser/build.xml:23: 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"
>
> I checked many times the I have correctly set the JAVA_HOME environment,
> what is wrong?
>
>


"douglas reames" <dougr@rmsfinance.com> ??????:bb5fut$a4s$1@rogue.oti.com...
> When I attempt to use ExternalTools:Ant to compile, I get the following
> error:
> "[javac] BUILD FAILED: file:H:/eclipse/workspace/.../build.xml:118: 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"
>
> Relevant Info:
> [1] running Eclipse version 2.1 on Windows 2000
> [2] Java_Home is set to the JDK directory: E:\j2sdk1.4.1_01
> [3] when I execute an Ant Echo Task in Eclipse ( <echo message="java.home
> = ${java.home}"/> ), it does indicate that java.home points to the JRE
> instead: E:\j2sdk1.4.1_01\jre,
> [4] I can see that Eclipse gets its information from the Windows Registry
> rather than the Windows Environment variables [JAVA_HOME] that Tomcat, Ant
> and other java-based programs use. There are JAVAHOME keys for the JDK
> and the JRE. I have [a] verified that the JDK and JRE keys point to the
> correct locations.
>
> And [b] I have tried to change the JRE key. When I make this change,
> Eclipse fails to launch. So I had to change it back.
>
> [5] Environment Variable - Classpath - does contain entry for Tools.jar
> which holds the class - com.sun.tools.javac.Main - Ant needs.
>
>
> How do I configure Eclipse to tell it where Java_Home is so that Ant can
> find the class in Tools.jar it needs to compile?
>
> Regards,
>
> Douglas Reames
> RMS Finance
> 919 929 3465
>
>
>
>
>
Previous Topic:IJavaProject - How do I determine build status (i.e., OK, warnings, errors)?
Next Topic:Missing Run-time Workbench configuration type
Goto Forum:
  


Current Time: Thu Dec 26 23:41:19 GMT 2024

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

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

Back to the top