Im looking at creating a system that will implement a modular approach and as such modules will need to be dynamically loaded at runtime.
I've read through this post Code ranch post and think I understand it reasonably well.
2 Questions really.
First off, is this a good example of how to create a plugin architecture?
Secondly, this framework will be supporting a commercial product. At the minute the entire program is contained in one .exe which has been compiled with excelsior jet. My concern is that If I chose to use a solution like the one listed in the link, will I be able to secure the jar files in any way so that it is not easy to access the code within them?
If this is going to be a desktop application, then you could do this using a rich client platform, for example the Eclipse RCP or NetBeans RCP. Both those already have a plugin architecture and automatic update functionality built-in.
Inventing and implementing a plugin architecture with automatic updates yourself is not going to be a simple task, it will take quite some time to design and implement something like that.
If there is really a strict requirement that it must be compiled into an .exe with Excelsior JET then that is going to make things more complicated. Neither Eclipse nor NetBeans use that, although they both have small .exe files to launch them.
Eclipse has been based on OSGi for a long time; NetBeans has its own module system, but since version 6.9 also supports OSGi.