reference to a jar file inside another jar file

J

JML

Hi, I need create a manifest file for a jar, but I need set the classpath in
the manifest file to reference a jar file inside the current jar file. My
idea is getting a single jar file which contains all the needed jar files.
 
O

Oscar kind

JML said:
Hi, I need create a manifest file for a jar, but I need set the classpath in
the manifest file to reference a jar file inside the current jar file. My
idea is getting a single jar file which contains all the needed jar files.

This is not possible IIRC: you'll have to copy the .jar files in the same
directory as the current .jar file, or package their contents in the
current .jar file.
 
T

Thomas Fritsch

JML said:
Hi, I need create a manifest file for a jar, but I need set the classpath in
the manifest file to reference a jar file inside the current jar file. My
idea is getting a single jar file which contains all the needed jar files.
Read
<http://java.sun.com/j2se/1.4.2/docs/api/java/net/JarURLConnection.html>
to get some clues about URLs for files inside a jar file.

Having read this, I've got the vague idea, that an URL like
jar:file:eek:uterfile.jar!innerfile.jar
contained in the manifest's classpath might do the trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top