0

我希望有人可以帮助我解决这个问题。我正在使用 Ant 脚本编译我的 java 代码,但出现以下错误:

[junitreport] Processing /home/sander/workspace/AntIntro/reports/junit/TESTS-TestSuites.xml to /tmp/null1570204945<br />
[junitreport] Loading stylesheet jar:file:/usr/share/eclipse/plugins/org.apache.ant_1.8.2.v20120109-1030/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl<br />
[junitreport] : Error! The first argument to the non-static Java function 'replace' is not a valid object reference.<br />
[junitreport] : Error! Cannot convert data-type 'void' to 'reference'.<br />
[junitreport] : Fatal Error! Could not compile stylesheet<br />
[junitreport] Failed to process /home/sander/workspace/AntIntro/reports/junit/TESTS-TestSuites.xml


我正在使用:
- Eclipse 3.7.2
- OpenJDK 7
- Archlinux x64
- JUnit 4
- Ant 1.7.2

希望有人可以帮助我,在此先感谢

4

1 回答 1

0

见我之前的评论。这是一个已知问题,解决方法是将 apache-ant-1.8.3 与 JDK-7 或 apache-ant-1.8.2 与 JDK-6 一起使用。

于 2012-08-30T07:12:48.667 回答