Archive for the ‘Development’ Category

Eclipse and Ant

No Comments »

I spent a while trying to figure this out and almost emailed developers, but then I found this simple solution.  Some projects you want to work on use Ant build files, but you (I) use Eclipse.  Their documentation says to download Ant and do it command-line style, but that’s a pain especially because you (I) know Eclipse has ANT built in.  So you right-click the build.xml file and try to run Ant, but it says that it can’t find a compiler or that JAVA_HOME points to your JRE (instead of JDK).  According to this website:

http://www.practicalembeddedjava.com/tools/eclipse_tips.html

Eclipse/Ant doesn’t use your system variables to find anything, so all you have to do is add tools.jar to Window>Preferences>Ant>Runtime>Classpath>Ant Home Entries with “Add External Jars”.  Since the screen shot at the site above is a little dated, I made one with my newish version of Eclipse (below).  Now the Ant build went fine (clean the project if you have to), and now you can run projects depending on Ant from Eclipse.

tools

(click the image a couple times to see the big version)