關於Command-line Arguments


<classpath refid="ant.run.lib.path"></classpath>
<sysproperty key="file.encoding" value="UTF-8"/>
<arg line="--rootpath=${rootpath}"/>
<arg line="--outputpath=${src}"/>
<arg line="${hibernate.mappings}"/>

</java>

在這裏給main方法傳過去的參數用<arg line>而不是用<arg value>,查閱參考文檔發現有如下幾句

Examples

<arg value="-l -a"/>

is a single command-line argument containing a space character.這裏表示只有一個參數

  <arg line="-l -a"/>

represents two separate command-line arguments.這裏用空格分開表示的是兩個獨立的參數

  <arg path="/dir;/dir2:\dir3"/>

is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章