Hello all,
As you may know by now, from my previous posts recently, I am working on a Paint application. My question, then, surprisingly does not involve Graphics or Swing.

So my question is this: I would like to be able to have a directory such as "APP_HOME\tools" or something similar, and I would like to have in it some .class files, that the program doesn't necessarily know anything about, perhaps except a known implemented interface, that will be loaded on start of application.

Can anyone give me a suggestion? Perhaps an overview of how a program like NetBeans or BlueJ handles plugins? Any information would be welcome.

Update:
After a lot of googleing I found this link: http://java.sun.com/developer/technicalArticles/javase/extensible/

it explains some of what I was curios about, but, I'm wondering how I can apply this to something like adding a new GUI component, or something similar. (although I know how I will implement drawing tools, and filters)

Any Suggestions, Comments?

You can look through the BlueJ source, and see if that helps.
You can download it here. You're going to want to look primarily at the bluej.extmgr, and bluej.extensions packages.
The BlueJ Extension API Library can be found on your computer at "<bluej_install_dir>/lib/bluejext.jar". The source code for that is in the BlueJ source download as well.
And last, but not least, here's the BlueJ extension writing tutorial.

I hope this helps make sense of installing plugins, it's going to look like a royal pain, but they more applications MUCH more useful =)

(I opted to post the BlueJ plugin stuff rather than NetBeans, because, frankly, I don't know if I want to look the the NetBeans source code, lol. I'm sure it's more or less the same thing.)

thanks for the suggestion, I actually already have the bluej source, but I haven't been able to run it out of Eclipse, I get a very strange error, but I will definitely look in those packages now. Maybe I'll post a new thread on the bluej error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.