[ajug-members] multiple jar versionsfor one application
Les Hazlewood
les at hazlewood.com
Thu May 1 11:36:45 EDT 2008
You cannot do this unless the jars are loaded by two different classloaders
that are both visible to the current application. Classloader priority can
change depending on your deployment platform (JBoss, Geronimo, etc).
If you're not using a 'platform' like the above, and just using the normal
JVM, this isn't possible. In this case, the first jar found in the JVM's
classpath will be used to satisfy the dependency and the other identical
fully qualified class name will be ignored.
Regards,
Les
On Thu, May 1, 2008 at 10:25 AM, Chris Abney <Chris.Abney at theice.com> wrote:
> Does any one know of a good way to access multiple versions of the same
> Jar file from one application.
>
> For example:
>
>
> public class myClass {
> :
> public void doIt() {
> org.chrisabney.functors.WorkerBee daddyBee = new
> org.chrisabney.functors.WorkerBee(); //The older version
> org.chrisabney.functors.WorkerBee sonBee = new
> org.chrisabney.functors.WorkerBee(); //The newer version
>
> daddyBee.doIt(); //The old boring way
> sonBee.doIt(); //The new wacky way
> }
> }
>
>
>
>
> Chris Abney
>
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ajug.org/pipermail/ajug-members/attachments/20080501/8bd60aad/attachment.html
More information about the ajug-members
mailing list