• ant 安装


    1、下载地址:http://ant.apache.org/bindownload.cgi

    2、安装:

           1、window以下:

                 解压apache-ant-1.8.4-bin.zip 到某个文件夹 F: oolsapache-ant

                环境变量加入 ANT_HOME    F: oolsapache-ant

                                          path 追加 F: oolsapache-antin 

                 測试:ant

                            C:Documents and Settingszhangchao02>ant
                             Buildfile: build.xml does not exist!
                             Build failed

                 測试成功

             2、linux以下:

                    解压 cd /usr/local/src   tar -zxvf apache-ant-1.8.4-bin.tar.gz

                    环境变量 /etc/profile  加入        export  ANT_HOME=/usr/local/src/apache-ant-1.8.4

                                                                             path 追加 /usr/local/src/apache-ant-1.8.4/bin

                                                                             source /etc/profile

                     測试 ant -version

                     Apache Ant(TM) version 1.8.4 compiled on May 22 2012

      3、ant 具体说明

            1、參考地址:http://www.cnblogs.com/clarkchen/archive/2011/03/10/1980194.html

                  http://blog.csdn.net/user4570/article/details/4221101

                http://www.blogjava.net/Files/dreamstone/ant3.rar

            <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <project basedir="." default="jar" name="TestDemo">
     <target name="A" if="ant.java.version">
      <echo message="Java Version: ${ant.java.version}" />
      <delete dir="build" />
     </target>
     <target name="main" depends="A" unless="amigo">
      <description>
        test depends
         </description>
      <echo message="first ant xml ${basedir}" />
      <mkdir dir="build"/>
      <mkdir dir="build/class"/>
      <javac srcdir="src" destdir="build/class" />
     </target>
     <target name="run" depends="main">
      <java classname="HelloGame">
       <classpath>
        <pathelement path="build/class"/>
       </classpath>
      </java>
     </target>
     <target name="jar" depends="run">
      <jar destfile="helloGame.jar" basedir="build/class">
       <manifest>
        <attribute name="Main-class" value="HelloGame" />
       </manifest>
      </jar>
     </target>
    </project>

           

          
                    

  • 相关阅读:
    获取客户及登录IP(Java)
    js初步
    数组方法
    BOM ;浏览器对象模型
    js事件
    EventListener()
    JS面向对象
    正则表达式
    -CSS盒模型和float
    EventListener()
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/4287356.html
Copyright © 2020-2023  润新知