CIS190-f09

From MCIS Wiki

Jump to: navigation, search

CIS 190: Intro to Programming

Text: http://freejavabook.com

Video: http://www.youtube.com/watch?v=02p-78L_jg4


How to package your Netbeans project into one jar

insert the following into your build.xml:

<target name="-post-jar">
        <jar jarfile="dist/YourNameHere.jar">
            <zipfileset src="${dist.jar}" excludes="META-INF/*" />
            <zipfileset src="./acm.jar" excludes="META-INF/*" />
            <manifest>
                <attribute name="Main-Class" value="YourPackageHere.Main"/>
            </manifest>
        </jar>
    </target>

where YourNameHere is the name of your output file you want and YourPackageHere is the package name that your main class is in.

Personal tools