This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes developing plugin system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "developing plugin system" Watch "developing plugin system" New topic

developing plugin system

Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
I'm trying to develop a simple plugin system. This system will allow plugins to be started and stopped. I am concerned about what to do when the plugin is stopped. What do I need to do in order to tell the JRE that the stopped plugin can be garbage collected when the JRE is ready to do it? Or do I just not do anything and let the JRE figure out that I'm not using it anymore and it can be GC'd?
I know that you cannot force GC of an object.
Chris Stewart
Ranch Hand

Joined: Sep 14, 2002
Posts: 184
Normally, I like to set the variable to null once I'm finished with it. Part of Java's GC is just what we are talking about. The JRE keeps up with variables and destroy's them we they will not be needed again.
On a different note, I'm curious as to what you mean by plugin system. Could you explain your plans a little more?
Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
Well, I was just playing around and decided to have a JFrame with a JDesktopPane. I thought it would be cool to implement a plugin system which the plugins took the form of a JInternalFrame. So that it appeared to be like a desktop that you could load different apps into. Each app would be a plugin in this desktop app.
I know there are already apps out there like this but I am just really messing around to get back into Java programming. I've been messing around with this language since it came out but never really got serious about it. Now I'm trying to get serious and get certified one day as well.
I agree. Here's the link:
subject: developing plugin system
It's not a secret anymore!