ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris brown" <...@reflexe.fr>
Subject Including other JAR files when building a redistributable JAR file
Date Wed, 23 Jan 2002 12:41:41 GMT
Hello,

I'm trying to create a few simple Java applications that I aim to deploy as
executable JAR files (runnable using "java -jar example.jar", or by
double-clicking on the jar file's icon where the platform supports it).  I
can do this no problem using Ant, and I've included an appropriate manifest
file with the Main-Class option specified.

The problem is that sometimes the code depends on external libraries (other
jar files).  I'm not sure how to create appropriate files for deployment in
these cases: can I bundle the third-party jar files *within* my jar files
(from a technical viewpoint, ignoring licencing issues)?

If so, where should they go within the jar files that I build?

Is there a specific relative path to use ("/lib"..?) or some declaration to
make in the manifest to declare/reference the third-party jars? (I had a
look on Sun's site to try and understand jar file structures etc., inc. the
java tutorial, but I didn't see this particular case clearly mentioned)

It can be somewhat tedious to manually install each jar file upon which my
executable jars depend, and update the end-users' classpaths manually (not
to mention controlling versions), which is why I'm looking to reduce
deployment to one file, one (double) click.

Thanks,
Chris Brown



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message