Reputation: 5040
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?
Upvotes: 2
Views: 5273
Reputation: 22435
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
Upvotes: 2
Reputation: 23321
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.
Upvotes: 0