Dynamic loading of jar at runtime

Discussion in 'Java' started by JonRose99, Jul 7, 2006.

  1. JonRose99

    JonRose99 Guest

    Hi,

    I'm trying to write an application in which I need to locate a java
    archive and instantiate objects from it at runtime. I gather the only
    way to do this is using a custom class loader and
    reflection for object construction and method invocation.

    It seems to me that this should be quite a common
    operation. I'd therefore like to know if there are any tools available
    that take the source code for the jar, create interfaces for it and
    then
    automatically construct 'proxy' classes that handle the reflection for
    me, i.e. the object construction and method delegation. I've read a bit
    about reflect.proxy facilities and that seems to be along the right
    lines, but surely there are tools available that automates this?

    Can anyone point me in the right direction or comment on the general
    approach?

    Many thanks!

    Jon
     
    JonRose99, Jul 7, 2006
    #1
    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. Reinhard Rossmy

    Dynamic loading of jar files...

    Reinhard Rossmy, Jul 28, 2003, in forum: Java
    Replies:
    1
    Views:
    7,211
    Reinhard Rossmy
    Jul 29, 2003
  2. Arnold Peters
    Replies:
    0
    Views:
    588
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,732
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,776
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    672
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page