How to Dynamically switch between two library?

Discussion in 'Java' started by mohamed, Jan 19, 2004.

  1. mohamed

    mohamed Guest

    Case:

    I use jasper ver 0.5 that use POI library ver 1.5.1 final

    Problem:
    I want to dynamically change the loaded library from POI 1.5.1 to POI
    2.0 RC2 at Runtime, and i doesn't know how

    Need:
    i want any one to help me with any sample code or any suggestions

    Thanks In Advance.
    mohamed, Jan 19, 2004
    #1
    1. Advertising

  2. mohamed wrote:
    > I use jasper ver 0.5 that use POI library ver 1.5.1 final
    >
    > Problem:
    > I want to dynamically change the loaded library from POI 1.5.1 to POI
    > 2.0 RC2 at Runtime, and i doesn't know how


    You need a separate ClassLoader (java.net.URLClassLoader probably) for that.
    Note that *all* access to the library classes must run through that
    ClassLoader then.
    Michael Borgwardt, Jan 19, 2004
    #2
    1. Advertising

  3. mohamed

    mohamed Guest

    Michael Borgwardt <> wrote in message news:<bugq8i$h2b72$-berlin.de>...
    > mohamed wrote:
    > > I use jasper ver 0.5 that use POI library ver 1.5.1 final
    > >
    > > Problem:
    > > I want to dynamically change the loaded library from POI 1.5.1 to POI
    > > 2.0 RC2 at Runtime, and i doesn't know how

    >
    > You need a separate ClassLoader (java.net.URLClassLoader probably) for that.
    > Note that *all* access to the library classes must run through that
    > ClassLoader then.



    Thanks Michael,

    But do you a sample code to be a start point 4 me.

    Thanks in Advance
    mohamed, Jan 20, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harsha Shah

    Switch Between Two Data Instance

    Harsha Shah, Jun 22, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    483
    Harsha Shah
    Jun 22, 2005
  2. GenxLogic
    Replies:
    3
    Views:
    1,242
    andrewmcdonagh
    Dec 6, 2006
  3. devphylosoff
    Replies:
    0
    Views:
    259
    devphylosoff
    May 25, 2007
  4. Switch Within A Switch

    , Apr 22, 2006, in forum: Javascript
    Replies:
    7
    Views:
    95
    Lasse Reichstein Nielsen
    Apr 22, 2006
  5. Replies:
    1
    Views:
    236
    Randy Webb
    Aug 25, 2006
Loading...

Share This Page