File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Plugin discovery and usage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Plugin discovery and usage" Watch "Plugin discovery and usage" New topic

Plugin discovery and usage

ashley pursglove

Joined: Jan 11, 2011
Posts: 2
Hi all,

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?

Kind Regards

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
This article I wrote some time ago may give you some ideas.

For a higher-end (more complicated and more flexible) solution, check out OSGi.
ashley pursglove

Joined: Jan 11, 2011
Posts: 2
Hi Ulf and thanks very much for the response.

I have had a quick look into the article.

I'll have a proper read through now. If I have any questions ill post here and hopefully you will be able to answer them.

Thanks for the info on OSGi.

Do you know of any good tutorials.

All the stuff I've found so far seems to be geared towards using eclipse. A netbeans tutorial would be great.

Kind Regards

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

Welcome to the Ranch.

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.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Plugin discovery and usage
It's not a secret anymore!