Ant “JAVA_HOME does not point to the JDK” – but it does

The real message is that Ant can’t find com.sun.tools.javac.Main. Which, together with the fact that the latest “Sun” (Oracle) JDK is 1.7.0_13 (or maybe _14, but definitely not the “_52” that your install dir indicates), makes me think that you’re not using a distribution that Ant recognizes. You can verify this by running jar tvf $JAVA_HOME/lib/tools.jar, and … Read more

How can I avoid this Ant Build error?

What is this ant build error in eclipse? When I click the Ant Build I have the error message shown below. Build failed Reason: Unable to find an Ant file to run. Could you please help me solve it?

Unable to locate tools.jar

Yes, you’ve downloaded and installed the Java Runtime Environment (JRE) instead of the Java Development Kit (JDK). The latter has the tools.jar, java.exe, javac.exe, etc.

what is this ANT build?

I had the exact same problem, where when I clicked “Run” I would get a menu with options of “Ant Build” or “Ant Build…” — even though I had a main method. I finally got my program to run as normal when I copied and pasted my code into a new file in a new … Read more

Problems with setting the classpath in ant

I think the problem is with your classpath path declaration. The build directory should be a <pathelement> Also, I would only include 3-rd party jars in your classpath refid. So the whole block looks like. Also, as DroidIn.net has pointed out, you should create a package for you program.

How can I use ant to execute commands on linux?

I would like to use ant to exectue a command like below: But it replies an error say The ‘ characters around the executable and arguments are not part of the command. The background is: I want to use ant to stop the apache server but it doesn’t installed by the same user I run … Read more