I down loaded eclipse-SDK-3.0.2-win32, and purchased the Eclipse Cookbook, 2004 ISBN: 0-596-00710-8. Example files are at
http://examples.oreilly.com/eclipseckbk/ Chapter 7 �Eclipse and Ant� develops a project called AntProject, which I am unable to get to work. Since the figures in the chapter don�t match the dialogs in Eclipse, I suspect the chapter needs to be updated to match the new Eclipse SDK.
I imported the example from Ch 07, which I downloaded from the Eclipse website, and got the following error message when I ran it:
Buildfile: C:\Documents and Settings\Administrator\Local Settings\Temp\eclipse-SDK-3.0.2-win32\eclipse\workspace\AntProject\build.xml
Initialization:
[delete] Deleting directory C:\Documents and Settings\Administrator\Local Settings\Temp\eclipse-SDK-3.0.2-win32\eclipse\workspace\AntProject\bin
[mkdir] Created dir: C:\Documents and Settings\Administrator\Local Settings\Temp\eclipse-SDK-3.0.2-win32\eclipse\workspace\AntProject\bin
[mkdir] Created dir: C:\Documents and Settings\Administrator\Local Settings\Temp\eclipse-SDK-3.0.2-win32\eclipse\workspace\AntProject\bin\lib
Compilation:
[javac] Compiling 1 source file to C:\Documents and Settings\Administrator\Local Settings\Temp\eclipse-SDK-3.0.2-win32\eclipse\workspace\AntProject\bin
BUILD FAILED: C:\Documents and Settings\Administrator\Local Settings\Temp\eclipse-SDK-3.0.2-win32\eclipse\workspace\AntProject\build.xml:20: Compiler Adapter 'org.eclipse.jdt.core.JDTCompilerAdapter' can't be found.
Total time: 1 second
How should I change the build.xml file below to get the program to work?
<?xml version="1.0" encoding="UTF-8"?>
<project name="AntProject" default="Build" basedir=".">
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter" />
<property name="srcDir" location="src" />
<property name="binDir" location="bin" />
<property name="jarDir" location="${binDir}/lib" />
<property name="jarFile" location="${jarDir}/AntProject.jar" />
<target name="Initialization">
<delete dir="${binDir}" />
<delete dir="${jarDir}" />
<mkdir dir="${binDir}" />
<mkdir dir="${jarDir}" />
</target>
<target name="Compilation" depends="Initialization">
<javac srcdir="${srcDir}"
destdir="${binDir}" />
</target>
<target name="Jar" depends="Initialization, Compilation">
<jar destfile="${jarFile}" basedir="${binDir}" />
</target>
<target name="Build" depends="Initialization, Compilation, Jar">
<echo message="Ant is building your project." />
</target>
</project>
Thank you in advance,
Ed