You can set java_home at runtime in windows. If you're compiling multiple projects with two version of java it is best not to set java_home as environment variable.
There are multiple ways of achieving the same outcome...here are two ideas. First, set java_home in a batch file to kick-off the build process and set java home. Create a .bat file and add the following content. set JAVA_HOME=<to directory path of java> call ant -f build.xml Second, create a build.properties in the same directory as build.xml and add the following content. java.home = <to directory path of java> Remember to load the properties file in your build.xml i.e. <property file="build.properties"/> Hope this helps. -----Original Message----- From: Knuplesch, Juergen [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 14, 2008 9:35 AM To: Ant Users List Subject: AW: how to change the property value at run time Thats just the special thing about ANT-properties: You can not change them, for good reasons. But JAVA_HOME does not look like an Ant-property. What do you want to do? -- Jürgen Knuplesch www.icongmbh.de icon Systemhaus GmbH Tel. +49 711 806098-275 Sophienstraße 40 D-70178 Stuttgart Fax. +49 711 806098-299 Geschäftsführer: Uwe Seltmann HRB Stuttgart 17655 USt-IdNr.: DE 811944121 -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 14. Mai 2008 15:20 An: user@ant.apache.org Betreff: how to change the property value at run time Hi All, I need to change the value of a specific property at run time. Can somebody please let me know how I can do that. Let's say the property name is "JAVA_HOME" and suppose I want to change the value of that property to "d:\install" Please help. Regards, Irfan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail message, including any attachments, is for the sole use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments. Gartner makes no warranty that this e-mail is error or virus free. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]