Я изучаю Java ant. Я создал проект в мире приветствия eclipse. И затем я сделал экспорт в проекте и создал файл сборки муравьев. Когда я запускаю муравей файл он не жалуется: BUILD FAILED C: \ Users ** \ рабочее место \ HelloWorld \ build.xml: 31: Класс не найден: javac1.8Ошибка сборки муравьев Java, потому что класс не найден
и точка этой линии:
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
Я использую eclipse kepler.
Вот мой build.xml файл:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="HelloWorld">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.2"/>
<property name="source" value="1.3"/>
<path id="HelloWorld.classpath">
<pathelement location="bin"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="HelloWorld.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target name="HelloWorld">
<java classname="HelloWorld" failonerror="true" fork="yes">
<classpath refid="HelloWorld.classpath"/>
</java>
</target>
</project>
Кто-нибудь знает, почему это происходит?
Как я обновить мою версию муравья, потому что это похоже, указывают на папку плагинов eclipse. –
Ответ здесь объясняет это отлично: http://stackoverflow.com/questions/5206431/how-to-upgrade-the-ant-built-into-eclipse – Bone
эй, я сделал то, что вы спросили i я все равно получаю ту же ошибку в этой строке: '' –