开发者

Change javac path from ant

Can I specify the javac path from within ant, when using开发者_如何学运维 fork ? I'm asking this because I need to run a script from an automation framwork(cruisecontrol) , however when I use fork, it uses jdk of a lower version bundled with the framework. Hence is there any way I can specify a different path for javac?


Use the build.compiler system property, or set the compiler property on the javac task:

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


set JAVA_HOME. If you want to use multiple JVMs in a single build that's not possible, you would need to run two ant commands and set the JAVA_HOME before each one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜