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 Container or Framework to launch classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Container or Framework to launch classes" Watch "Container or Framework to launch classes" New topic

Container or Framework to launch classes

Sean Riley

Joined: Jun 08, 2004
Posts: 11
I am looking for a framework like application, which I can plug in selected classes to. These classes will have different jobs.

E.g. MyMainApp will run all the time (controlling the plug-ins??). Plug-in A, B or C or a combination of the three can be configured to start up with MyMainApp.

All my searching has turned up nothing yet, I fear it is because I am not using the correct terminology. Please could some-one help me with the correct words to use in my search.

Many Thanks

Of all the things I've lost in my life it's my mind I miss the most.
Sean Riley

Joined: Jun 08, 2004
Posts: 11
As it always happens while I was gathering my thoughts about how to post this request, I came up with more terms to use in my search.

I have stumbled upon Java Plugin Framework. I will continue down this road for a while.

Has any-one any experience with this framework? Are there any others like it?

Many Thanks
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Depending on the type of application, you might consider using the Eclipse platform ( which is designed for doing this kind of thing in a desktop app, or an "application server" (Tomcat, JBoss, etc.) Servlets and EJBs are really just another way to look at plug-ins.

[Jess in Action][AskingGoodQuestions]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
For me the breakthrough to plugins was the "Dependency Inversion Principle". It means that the engine is calling the plugins, but the compile-time dependency is inverted - the plugins must reference the engine to compile.

So the engine package might have the Engine class and the IPlugin interface. You can compile this, bundle it up in a jar and sell it on EBay.

You build the plugin package later. Maybe folks who bought your jar on EBay build their own plugins to work with your Engine, kind of like people write plugins for Eclipse. Plugin packages have classes that implement the Plugin interface.

We glue them together with configuration and some form "Dependency Injection". The Engine winds up with code like:

The factory can return new plugins that the Engine authors never heard of. The factory might say

Does that sound fun? If so, Google for more good stuff on Dependency Inversion and Dependency Injection.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: Container or Framework to launch classes
It's not a secret anymore!