我有一些旧的 Java 源代码,它们在 ant 中引发错误。
[javac] Enumeration enum = props.propertyNames();
[javac] ^
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
如何教 ANT 使用 -source 1.4
?
最佳答案
Javac
任务具有 source
和 target
属性来指定 JVM 版本...
http://ant.apache.org/manual/Tasks/javac.html
如 build.xml
中的以下内容...
<javac source="1.4" target="1.4" ...>
关于java - 在Ant中使用Java 1.4进行编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13567927/