Skip to main content



      Home
Home » Newcomers » Newcomers » ant build fails: error running javac.exe compiler(ant build)
ant build fails: error running javac.exe compiler [message #548766] Thu, 22 July 2010 18:29 Go to next message
Eclipse UserFriend
My ant build fails with this error: "error running javac.exe compiler"
Doesn't give me any other information.
javac should be a pretty standard target, shouldn't it?
is it not finding the exe?

What am i missing?

Thanks in advance,
Nilesh

[UPDATE] - installed Ant 1.8.1, tried running ant from command line, got the same error, set JAVA_HOME, and command line worked.
Set eclipse to use Ant 1.8.1, added tools.jar to the classpath, still no dice.
ARRRGH!

[Updated on: Thu, 22 July 2010 19:28] by Moderator

Re: ant build fails: error running javac.exe compiler [message #548780 is a reply to message #548766] Thu, 22 July 2010 19:56 Go to previous messageGo to next message
Eclipse UserFriend
Success, finally.

Saw another post - someone asking how to set the JAVA_HOME using the -vm option. The reply was that you can't - it's a bug, because eclipse is looking at a JRE, instead of a JDK.
so i went and changed the path of my "JRE" within eclipse to the JDK, and voila!

I'm absolutely amazed at how people can use this IDE.
I have used IntelliJ happily for years, and have failed time and again to switch to eclipse, because it's such a...
guess it's best to help fix it than complain about it...

have a good day, y'all!
Re: ant build fails: error running javac.exe compiler [message #549391 is a reply to message #548780] Mon, 26 July 2010 10:27 Go to previous messageGo to next message
Eclipse UserFriend
On 7/22/10 7:56 PM, Nilesh wrote:
> Success, finally.
>
> Saw another post - someone asking how to set the JAVA_HOME using the -vm
> option. The reply was that you can't - it's a bug, because eclipse is
> looking at a JRE, instead of a JDK.
> so i went and changed the path of my "JRE" within eclipse to the JDK,
> and voila!
>
> I'm absolutely amazed at how people can use this IDE.
> I have used IntelliJ happily for years, and have failed time and again
> to switch to eclipse, because it's such a...
> guess it's best to help fix it than complain about it...
>
> have a good day, y'all!

Your problem was user error, not a bug. You were using a JRE and
expected Ant to find a javac executable, which simply isn't included in
any JRE.
JAVA_HOME is a Sun-specific thingy that Eclipse chooses not to use
(mostly because system-wide environment variables are a bad idea in
general); as you found, there is an easy way to tell Eclipse about any
number of JREs and JDKs to use to build and run your apps. That
flexibility is powerful and a designed feature.

Eric
Re: ant build fails: error running javac.exe compiler [message #889207 is a reply to message #549391] Mon, 18 June 2012 23:07 Go to previous message
Eclipse UserFriend
Eric,
Technically, your reply is accurate. However, a problem that recurs frequently, which causes users dismay and delay, while not a bug, is a problem that 'bugs' people, and should be addressed. A quick search of the web shows that this 'problem' or 'bug' occurs frequently, and the error message is not informative, thus dismay and delay. Is there a chance that the error message could be changed a bit so that the delay would be less?
I'm always hoping for increased user friendliness in every tool I use, even the very best ones. I love the tools that are provided to me; eclipse is excellent.

Ray

[Updated on: Mon, 18 June 2012 23:08] by Moderator

Previous Topic:eclipse creating AVD view automatically - How to stop?
Next Topic:viewing metamodel
Goto Forum:
  


Current Time: Wed Jul 23 11:04:49 EDT 2025

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

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

Back to the top