使用 fork 时,我可以从 ant 中指定 javac 路径吗?我问这个是因为我需要从自动化 framwork(cruisecontrol) 运行脚本,但是当我使用 fork 时,它使用与框架捆绑在一起的较低版本的 jdk。因此,有什么方法可以为 javac 指定不同的路径吗?
最佳答案
使用build.compiler
系统属性,或在javac
任务上设置compiler
属性:
The compiler implementation to use. If this attribute is not set, the value of the build.compiler property, if set, will be used. Otherwise, the default compiler for the current VM will be used.
关于java - 从 ant 更改 javac 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7107168/