<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gabriel Jones &#187; eclipse</title>
	<atom:link href="http://gabrieljones.com/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://gabrieljones.com</link>
	<description>Web Developer Weblog</description>
	<lastBuildDate>Fri, 29 Jul 2011 13:27:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Get Ant Compiling in Eclipse</title>
		<link>http://gabrieljones.com/how-to-get-ant-compiling-in-eclipse/</link>
		<comments>http://gabrieljones.com/how-to-get-ant-compiling-in-eclipse/#comments</comments>
		<pubDate>Sat, 23 Sep 2006 02:10:31 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://gabrieljones.com/?p=9</guid>
		<description><![CDATA[I recently came across a rather confusing issue with Ant not compiling in Eclipse, giving the following error:
[javac] BUILD FAILED: [build file location]
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 first made sure my Classpath was pointing to my jdk bin, which it was, then [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a rather confusing issue with Ant not compiling in Eclipse, giving the following error:</p>
<blockquote><p>[javac] BUILD FAILED: [build file location]<br />
Unable to find a javac compiler;<br />
com.sun.tools.javac.Main is not on the classpath.<br />
Perhaps JAVA_HOME does not point to the JDK</p></blockquote>
<p>I first made sure my Classpath was pointing to my jdk bin, which it was, then I made sure my java compiler (javac) was in the correct directory, which also was in right place.</p>
<p>Now I know Eclipse knows my jre and jdk installs, because it detects it on startup.  The only issue that is left is whether or not Eclipse preferences are pointing Ant to the right .jar.</p>
<p>The solution I found, that has worked for me so far, is as follows:</p>
<ul>
<li>Go to <em>Window &gt; Preferences &gt; Ant &gt; Runtime</em>. Choose the Classpath tab. Select the <em>Global Properties</em> node in the tree and click <em>Add External JARs</em>. Select <strong>tools.jar</strong> from your JDK directory.</li>
<li>Go to <em>Window &gt; Preferences &gt; Java &gt; Installed JREs</em>. Double click your JRE and deselect &#8220;Use default system libraries&#8221;. Click <em>Add External JARs</em> and add the location of <strong>tools.jar</strong> to that classpath. Make sure you are using the SDK and not the JRE.</li>
</ul>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://gabrieljones.com/how-to-get-ant-compiling-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

