posts - 431,  comments - 344,  trackbacks - 0
          目前需要使用ant來執行一個含有main方法的class文件,并且需要通過命令來行傳兩個參數(start和end)到main方法。

          <target name="gsp" depends="compile" description="generator structure pictures">
            <echo message="----------- Generator structure pictures ------------" />
            <property name="start" value="1" />
            <property name="end" value="892046" />

             <java fork="true" classname="com.founder.cst.system.StructureImageGenerator">
              <arg value="${start}"/>
              <arg value="${end}"/>

              <classpath path="${build.dir}/classes"/>
              <classpath refid="classpath" />
             </java>
             <echo message="----------- End------------" />
           </target>

          這樣執行ant gsp -Dstart=10 -Dend=20 就可以把10和20傳到main方法中了,最好設置默認值。
          posted on 2009-04-02 11:52 周銳 閱讀(2742) 評論(0)  編輯  收藏 所屬分類: Ant
          主站蜘蛛池模板: 北流市| 辽宁省| 丰城市| 丹江口市| 湾仔区| 华坪县| 丰顺县| 高邑县| 巢湖市| 和静县| 太和县| 通山县| 金昌市| 汽车| 左云县| 井冈山市| 邹平县| 潮州市| 莱芜市| 南城县| 昆山市| 襄垣县| 木兰县| 鹿泉市| 合阳县| 贵南县| 奉节县| 庆元县| 仁怀市| 许昌县| 乌海市| 绵竹市| 德惠市| 甘肃省| 朝阳县| 兖州市| 紫阳县| 哈尔滨市| 林州市| 和平县| 托克逊县|