How to set the path environment variable from ant script
问题 How to set the path environment variable from ant script 回答1: Is this for an <exec> task? You can set environment variables when you run an <exec> task: <exec executable="${my.command}"> <env key="foo" value="bar"/> <arg line="some value"/> </exec> You can use <property environment="env"/> to expand the path: <property environment="env"/> <exec executable="${my.command}"> <env key="PATH" value="${env.PATH}:${my.directory}"/> </exec> If this is for some custom task that requires an environment