Dynamic loading of jar at runtime

J

JonRose99

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top