db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Pouttu-Clarke <Matt.Pouttu-Cla...@icrossing.com>
Subject Re: packaging derby.jar in application jar file
Date Sat, 02 Apr 2011 15:32:57 GMT
Eclipse Jar export has three options for packaging the dependent classes,
including packaging jars within jars.

The JDK loads the jars correctly as long as the manifest is updated
correctly.  Use it all the time with Derby and it works great.

You can also do the same thing with Ant and Maven as well, but it sounded
like Kris didn't have time for setting up a whole automated build process ;)


On 4/2/11 7:24 AM, "Bryan Pendleton" <bpendleton.derby@gmail.com> wrote:

> On 04/01/2011 07:40 PM, Kris Hayden wrote:
>> hello. i have been coding an application by hand and have been having
>> a hard time getting the derby.jar file to be loaded from inside my jar
> Do you literally mean a jar-within-a-jar, not a jar-within-a-war and
> not a jar-within-a-ear? I don't think that the basic JDK jar loading
> utilities are capable of resolving class references to a jar within a jar;
> that sort of fancy class loading is generally done by the application
> class loaders found in application servers.
> The mechanism of having your manifest refer to a separate jar file is
> the only way I know of for the basic JDK jar loader to affect the class path.
> If you want to package everything as a single jar, you could try
> un-jarring all the Derby code into simple .class files and then re-packaging
> it into a single jar with no internal structure, just all .class files
> within the jar.
> But really, this is a lot of work; I think it would be easier to
> keep the Derby jars separate, in their existing jar files, and re-design
> your application strategy to allow for multiple jar files in the overall
> packaging.
> For one thing, the Derby security policy implementation assumes that the
> Derby jars are left as is, not re-packaged.
> Can you describe some of the reasons that you want to repackage Derby?
> thanks,
> bryan

iCrossing Privileged and Confidential Information
This email message is for the sole use of the intended recipient(s) and may contain confidential
and privileged information of iCrossing. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by reply email
and destroy all copies of the original message.

View raw message