[ajug-members] multiple jar versionsfor one application

Carl Hall carl.hall at gmail.com
Thu May 1 11:43:09 EDT 2008


You can't have 2 versions of the same jar in the same classloader because
they will collide.  First jar loaded by the classloader will be the one that
is available.  To have 2 versions of the same class, you'll need to change
the package or class name.



On 5/1/08, 521 <521 at ofig.org> wrote:
>
> i am a java beginner, but from what i've read- it's looked at by name, i
> would think it would have to be
>
> org.chrisabney.functors.WorkerBee-v1
> vs.
> org.chrisabney.functors.WorkerBee-v2
>
> -or the like/whatever_name(s)...?  not sure...
>
> barclay
>
> On Thu, 1 May 2008 10:25:21 -0400, Chris Abney 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
>
>
> _______________________________________________
> 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/02583cae/attachment-0001.html 


More information about the ajug-members mailing list