[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: ant build script - cannot compile java classes

Rocco,

Three things...
Search for answers at http://www.eclipse.org/search/search.cgi before
posting. This question must have been asked 100 times.
This newsgroups is deprecated. Ant questions should be asked at
eclipse.platform
You should move to the 2.1 release build. Bigger and better things await you
in that build :-)
http://download2.eclipse.org/downloads/drops/R-2.1-200303272130/index.php

To answer your question:
You do not need to set JAVA_HOME it is not used in this context.

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

If you start Eclipse using the -vm arg so that Eclipse is launched using
C:/j2sdk1.4.1_01, Eclipse will automatically add the tools.jar to the Ant
runtime classpath.

HTH
Darins

"garfield" <redaktion@xxxxxxxxxxxxxx> wrote in message
news:b9tg52$vh7$1@xxxxxxxxxxxxxxxx
> hello
> i've got the problem on running my ant-built script within eclipse, the
> compilation task of the java classes breaks, every other task works.
>
> error message for the compile task:
>
> [javac] BUILD FAILED: file:C:/Share/Java/_test/build.xml:24: 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've set the JAVA_HOME variable in the window
> - > Preferences -> Classpath Variables -> JAVA_HOME=C:/j2sdk1.4.1_01, and
as
> system variable. error message is always the same!
> has everybody a hint?
> where sould I set the JAVA_HOME variable?
>
> eclipse version: 2.1, build: 200212181304
>
> thanks for help!
>
> regards rocco
>
>
>
>