db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: Use of 3rd party libraries
Date Fri, 29 Apr 2005 21:40:33 GMT

David Van Couvering wrote:

> A quick look at java.ext.dirs seems to indicate the intention for this 
> is for packages with the root javax.*, which are specifically defined 
> as extensions of J2SE.  Is this really the right place to put things 
> like third-party JAR files?

I believe it is one option (but as you indicate, not the only option)  
and the J2EE 1.4 specs now allow for this . 
http://java.sun.com/j2se/1.4.2/docs/guide/extensions/extensions.html  is 
a good source of info on this topic

> The approach I have seen is you write your own classloader that then 
> uses a property to load classes from jar files stored in a particular 
> directory.  If I remember right, BEA's app server used to do this, 
> quite nice.

J2EE 1.4  added  the optional package support feature to make things 
easier to support things such as frameworks.  Previously it was a 
nightmare dealing with this.

I know we always dump the JDBC drivers into the appservers configured 
lib/ext directory.


> David
> Lance J. Andersen wrote:
>> That is a very good point.  You could also use lib/ext as well and 
>> set the property  java.ext.dirs property accordingly
>> Jeremy Boynes wrote:
>>> Lance J. Andersen wrote:
>>>> There is also an issue on windows of a classpath size.  I know i 
>>>> have been burnt by this before.
>>> I think most projects of any size, commercial or open source, have 
>>> moved away from using raw CLASSPATH and use custom classloading.
>>> For example, a common technique is to have a "lib" directory where 
>>> all files get added into a single classloader - not perfect 
>>> especially when you may need multiple versions of a library but it 
>>> works for many applications.
>>> There are also things like the uberjar project at Codehaus for 
>>> bundling things together.
>>> -- 
>>> Jeremy

View raw message