gpt4 book ai didi

java - 从 ant 更改 javac 路径

转载 作者:行者123 更新时间:2023-11-30 09:46:30 27 4
gpt4 key购买 nike

使用 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.

http://ant.apache.org/manual/Tasks/javac.html

关于java - 从 ant 更改 javac 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7107168/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com