Ant, Eclipse Config and JRE [message #54481] |
Thu, 29 May 2003 17:40 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02928 seconds