Windows平台使用ANT或IntelliJ IDEA编译生成Jar

1、ANT方式

      buid.xml内容:

<project name="TestHadoop" default="compile" basedir=".">
    <property name="build" location="build" />

    <path id="hadoop-classpath">
        <fileset dir="D:\Lab\lib\hadoop\hadoop-1.2.1/lib">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="D:\Lab\lib\hadoop\hadoop-1.2.1">
            <include name="**/*.jar" />
        </fileset>
    </path>

    <target name="compile">
        <mkdir dir="${build}" />
        <javac includeantruntime="false" srcdir="src" destdir="${build}">
            <classpath refid="hadoop-classpath"/>
        </javac>
        <jar jarfile="pc.jar" basedir="${build}" />
    </target>

    <target name="clean">
        <delete dir="${build}" />
    </target>

    <target name="print-cp">
        <property name="classpath" refid="hadoop-classpath"/>
        <echo message="classpath= ${classpath}"/>
    </target>
</project>

2、IntelliJ IDEA

Windows平台使用ANT或IntelliJ IDEA编译生成Jar


Windows平台使用ANT或IntelliJ IDEA编译生成Jar,布布扣,bubuko.com

Windows平台使用ANT或IntelliJ IDEA编译生成Jar

上一篇:windows下常用命令


下一篇:Win7 + vs2012 + cocos2d-x2.2 配置开发环境