Eclipse导入ant编译的项目出错
导入ant项目时提示:
Specified buildfile does not contain a javac task
可修改build.xml文件,再最后一行之前添加:
<javac srcdir="src" destdir="bin" />
例如:
<?xml version="1.0" encoding="UTF-8"?> <project name="HW.makejar" default="makejar" basedir="."> <target name ="makejar" description="Create a jar for the HW project"> <jar jarfile="HelloWorld.jar" includes="*.class" basedir="bin" /> </target> <javac srcdir="src" destdir="bin" /> </project>