S
Steve Sobol
Here's what I'd like to do:
I am creating an application whose functionality will be provided by
plugins. These plugins will be Java classes implementing an interface I am
creating. One of the methods that must be implemented is called
registerPlugin() (there will be other methods too, but that's the only one
that's important right now).
I will be scanning a directory, most likely right under the directory where
my app is installed, for jar files, each containing one plugin class, and
possibly several supporting classes in addition to the plugin class.
These jars are NOT going to be on the classpath.
Each jar containing a plugin will have a line like the following in its
manifest:
Plugin-Class: net.justthe.pluginImpl.myCoolPlugin
Basically, the process will be to check each jar and...
--find out which class to load by reading the Plugin-Class line from the
manifest
--load that class
--call registerPlugin()
Now, the reason that I'm writing is that my experience loading classes like
this is, well... nonexistent, and I'd like some advice on how to go about
doing it. I'm not asking anyone to write code for me. I just need a few
pointers.
Thanks in advance... **SJS
--
JustThe.net - Steve Sobol / (e-mail address removed) / PGP: 0xE3AE35ED
Coming to you from Southern California's High Desert, where the
temperatures are as high as the gas prices! / 888.480.4NET (4638)
"Life's like an hourglass glued to the table" --Anna Nalick, "Breathe"
I am creating an application whose functionality will be provided by
plugins. These plugins will be Java classes implementing an interface I am
creating. One of the methods that must be implemented is called
registerPlugin() (there will be other methods too, but that's the only one
that's important right now).
I will be scanning a directory, most likely right under the directory where
my app is installed, for jar files, each containing one plugin class, and
possibly several supporting classes in addition to the plugin class.
These jars are NOT going to be on the classpath.
Each jar containing a plugin will have a line like the following in its
manifest:
Plugin-Class: net.justthe.pluginImpl.myCoolPlugin
Basically, the process will be to check each jar and...
--find out which class to load by reading the Plugin-Class line from the
manifest
--load that class
--call registerPlugin()
Now, the reason that I'm writing is that my experience loading classes like
this is, well... nonexistent, and I'd like some advice on how to go about
doing it. I'm not asking anyone to write code for me. I just need a few
pointers.
Thanks in advance... **SJS
--
JustThe.net - Steve Sobol / (e-mail address removed) / PGP: 0xE3AE35ED
Coming to you from Southern California's High Desert, where the
temperatures are as high as the gas prices! / 888.480.4NET (4638)
"Life's like an hourglass glued to the table" --Anna Nalick, "Breathe"