Thoughts embedded below....
Agreed, but the code supplied will have to be within the scope as defined by
the classpath. Indeed it could be in any directory or set of directories
that correspond to the classpath.
For example if I define a classpath as "/classpath:/~/classpath" and I
define the name of the package that I am going to scan as
"com.mycorp.myapp.plugins" then the extension classes could be in
~/classpath/com/mycorp/myapp/plugins/* or as I understand it (although
haven't tried) I could probably have some in the /classpath path and some in
the ~/classpath path.
I was thinking that by adopting this approach, extending my app would be as
simple as compiling a new class into whichever directory on the class path
you like. In this manner there is no restriction to a particular directory -
the plugins simply work if they are placed somewhere in the classpath in the
package I am looking for.
Absoulutely agree with what you say re the use of packagenames - it seemed
reasonable to me to define a "plugins" package for my app to organise them.
I shall explore that - thanks
Not really, I was providing more specific information in the hope someone
might say well you can't do exactly that but you could do this.
I am thinking the way I am going to have to tackle this is either restrict
to a particular directory or scan the directories listed in the classpath in
conjunction with my package name looking for .class files.
Shame, Java does so much, I thought/hoped it could do this as well.