如题:
test.bat
@echo off
echo Input you QQ number ......
set /p QQ=
echo Your QQ number is %QQ%.
call ant -buildfile test.xml -Din=%QQ%
pause
test.xml
<?xml version="1.0" encoding="utf-8"?>
<project name="test" default="main">
<property name="in" value="${in}" />
<target name="main" >
<echo message="in: ${in}" />
</target>
</project>
执行test.bat效果: