As of version 1.6.2, the ant launcher shell script evaluates single quoted properties given on the command line (-D). This causes the expansion of system variables and backtick quoted commands. This is not correct behavior for single quoted properties. The "ant" shell script uses: (line 38 in ant 1.7.0) ant_exec_args="$ant_exec_args \"$arg\"" This fixes the problem: (but may not be the final solution) ant_exec_args="$ant_exec_args '$arg'" Here is a test that compares 1.6.1 behavior and 1.6.2, as well as 1.7.0. This test has been run on Linux RedHat-AS 4.0u3. Buildfile: tt.xml linux$ ant -Dthis.variable='`cd /tmp; pwd`' -f tt.xml test test: [echo] Ant version: Apache Ant version 1.6.1 compiled on February 12 2004 [echo] this.variable: `cd /tmp; pwd` [exec] `cd /tmp; pwd` BUILD SUCCESSFUL Total time: 0 seconds linux$ ant -Dthis.variable='`cd /tmp; pwd`' -f tt.xml test Buildfile: tt.xml test: [echo] Ant version: Apache Ant version 1.6.2 compiled on July 16 2004 [echo] this.variable: /tmp [exec] /tmp BUILD SUCCESSFUL Total time: 0 seconds linux$ ant -Dthis.variable='`cd /tmp; pwd`' -f tt.xml test Buildfile: tt.xml test: [echo] Ant version: Apache Ant version 1.7.0 compiled on December 13 2006 [echo] this.variable: /tmp [exec] /tmp BUILD SUCCESSFUL Total time: 0 seconds Ant test: <?xml version="1.0" encoding="UTF-8"?> <project name="test" default="all" basedir="."> <target name="all"></target> <target name="test"> <echo message="Ant version: ${ant.version}"/> <echo message="this.variable: ${this.variable}"/> <exec executable="echo"> <arg line="${this.variable}"/> </exec> </target> </project>