Reputation: 1437
I have given atask to buld the ant file. The interestuing path is there is no JDK installed, only JVM is installed. It seems to me that Eclipse is using internally JDK.
Now, when I run the ant file it's throwing me an exception Unable to find a javac compiler; so how Can I fix this ?
Upvotes: 1
Views: 842
Reputation: 51445
I found this in the current Eclipse help: Using the ant javac adapter
The Eclipse compiler can be used inside an Ant buildfile using the javac adapter. In order to use the Eclipse compiler, you simply need to define the build.compiler property in your buildfile.
This might also work in Eclipse 3.4. Ganymede help files aren't online.
Edited to add the ant compiler property definition:
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
Upvotes: 1
Reputation: 19050
Eclipse JDT (Java developement tool) is able to run on top of a JRE only as you said because it embed its own Java compiler. I think you can use this compiler to compile code outside Eclipse but I am not able yet to find ressources on the web explaining how to do this.
Moreover I am not sure you will be able to tell Ant (here I speak about Ant running outside Eclipse, because Eclipse also has its own internal Ant runner) to use this compiler instead of using the javac compiler find in default location.
Upvotes: 0