Monday, April 13, 2009

Netbeans combine library jar and output jar

Combine library jar and executing jars into one jar


<target name="-post-jar">
<jar jarfile="dist/Combined-dist.jar">
<zipfileset src="${dist.jar}" excludes="META-INF/*" />
<zipfileset src="lib/commons-io-1.4.jar" excludes="META-INF/*" />
<manifest>
<attribute name="Main-Class" value="com.example.mypackage.Main"/>
</manifest>
</jar>
</target>

1 comment:

  1. The lines above are added to build.xml file, this file is located in the project folder

    ReplyDelete