Jump to content

Create Jar And Include External Jars


Jack McKalling

Recommended Posts

I have an Eclipse project MyApplication, that I want to export into a runnable jar file MyApplication.jar. I know it is easy with an Ant task, but I want to simulate it via batchscript command line.Basically, I want the ability that the Eclipse Ant task has, to include external jar files, and NOT by adding it to the classpath in the jar's manifest file. The ant task ultimately adds the content of an external jar file into the new jar. Can this all be done with batchscript?Whereas the script for creating a jar would be:

set COMMANDJAR="C:\Program Files\Java\jdk1.6.0_13\bin\jar.exe"set JARFILE=MyApplication.jarset MANIFEST=manifest.txtset SOURCEDIR=bin%COMMANDJAR% cfm "%JARFILE%" "%MANIFEST%" -C "%SOURCEDIR%" .

So how to include the contents of "external.jar" to MyApplication.jar?Or better said, what is the command line replacement for <zipfileset> in an Ant task?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...