Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse/ANT problem with javac task
Eclipse/ANT problem with javac task [message #93430] Mon, 14 July 2003 20:05 Go to next message
Andreas Schildbach is currently offline Andreas SchildbachFriend
Messages: 70
Registered: July 2009
Member
Hello everyone,

since a few weeks I keep getting the attached error message if I invoke
a javac ant task from within Eclipse on my WinXP system. It happens with
versions 2.1 and 2.1.1.

I can't remember what configuration I have been fooling around.

However, I double-checked:

- JAVA_HOME is indeed defined (as a system environment variable).

- The correct JARs are included in the Ant classpath
(Preferences->Ant->Runtime->Classes).

What else should I check?

Now here is the error message:

compile:
[copy] Copying 1 file to C:\eclipse\workspace\xxx\build\classes
[javac] Compiling 1 source file to
C:\eclipse\workspace\xxx\build\classes
[javac] BUILD FAILED:
file:C:/eclipse/workspace/xxx/build.xml:27: 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

Regards,

Andreas
Re: Eclipse/ANT problem with javac task [message #93473 is a reply to message #93430] Mon, 14 July 2003 20:33 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Please search the newsgroup for answers. This has been answered 100s of
times.
See http://www.eclipse.org/search/search.cgi

One more time:
The JAVA_HOME error message is from Apache Ant which does not know that it
has been integrated within Eclipse.

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

This is done for you automatically if you start Eclipse using a JVM from a
JDK install. This is accomplished using the -vm arg.

Alternately, you can set the build.compiler property to
"org.eclipse.jdt.core.JDTCompilerAdapter" if you wish to use Eclipse's
internal compiler.

Note that if you set ANT_HOME ensure to read the Ant known issues section of
the Eclipse readme or see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=34151

HTH
Darins

"Andreas Schildbach" <andreas@schildbach.de> wrote in message
news:bev2d2$p0p$1@eclipse.org...
> Hello everyone,
>
> since a few weeks I keep getting the attached error message if I invoke
> a javac ant task from within Eclipse on my WinXP system. It happens with
> versions 2.1 and 2.1.1.
>
> I can't remember what configuration I have been fooling around.
>
> However, I double-checked:
>
> - JAVA_HOME is indeed defined (as a system environment variable).
>
> - The correct JARs are included in the Ant classpath
> (Preferences->Ant->Runtime->Classes).
>
> What else should I check?
>
> Now here is the error message:
>
> compile:
> [copy] Copying 1 file to C:\eclipse\workspace\xxx\build\classes
> [javac] Compiling 1 source file to
> C:\eclipse\workspace\xxx\build\classes
> [javac] BUILD FAILED:
> file:C:/eclipse/workspace/xxx/build.xml:27: 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
>
> Regards,
>
> Andreas
>
Re: Eclipse/ANT problem with javac task [message #95601 is a reply to message #93430] Thu, 17 July 2003 10:15 Go to previous message
Eclipse UserFriend
Originally posted by: veith.pixel.de

hi,

I got this "feature" too, some time ago. The point is, eclipse does not
use the runtime, you've specified by java_home but the jre that has
set the registry entry (under windows) JavaHome. A jre does not contain
any compilers. You can force eclipse to use the runtime under java_home:
-vm %java_home%/bin/javaw.exe

Gernot


Andreas Schildbach wrote:
> Hello everyone,
>
> since a few weeks I keep getting the attached error message if I invoke
> a javac ant task from within Eclipse on my WinXP system. It happens with
> versions 2.1 and 2.1.1.
>
> I can't remember what configuration I have been fooling around.
>
> However, I double-checked:
>
> - JAVA_HOME is indeed defined (as a system environment variable).
>
> - The correct JARs are included in the Ant classpath
> (Preferences->Ant->Runtime->Classes).
>
> What else should I check?
>
> Now here is the error message:
>
> compile:
> [copy] Copying 1 file to C:\eclipse\workspace\xxx\build\classes
> [javac] Compiling 1 source file to
> C:\eclipse\workspace\xxx\build\classes
> [javac] BUILD FAILED: file:C:/eclipse/workspace/xxx/build.xml:27:
> 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
>
> Regards,
>
> Andreas
>
Previous Topic:Getting a handle for the active WorkingSet
Next Topic:[CVS - ssh] Removing "man-in-the-middle" attack warning
Goto Forum:
  


Current Time: Sat Oct 19 14:46:54 GMT 2024

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

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

Back to the top