Ask for your help on implementing plug-in mechanism

Joined
Jul 7, 2006
Messages
1
Reaction score
0
Hi all,

I'm trying to implement some plug-in mechanism for my app, but I do not have
a whole picture in mind.

I hava an abstract class defined in my app's classpath for a plug-in to extend.
A plug-in also needs to access some global objects and to use some helper class
in my app. A plug-in implementation may require several related classes and users may organize them in a package hierarchy. Plug-ins can be loaded dynamically.

My questions are:

1) How am I supposed to present those global objects and those helper classes
in my app to a plug-in?

2) Use reflections to check a plug-in implements rigth abstract functions?

2) If I want to group plug-in implementation classes into a JAR and then use
URLClassLoader to load it in, is there anything I need to pay attention to?
I'm asking because I heard other people have trouble with ClassNotFoundException or NoClassDefFoundError.

Thanks
 

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,794
Messages
2,569,641
Members
45,355
Latest member
SJLChristi

Latest Threads

Top