| | |
Plugins
![]() |
If I want to add a plugin which I have designed after I have written the software ... how should I do it. Suppose I designed a word pad ... and then I designed a spell checker ... how should I add the spell checker to my word pad to get it working
Hey sani,
Have you used eclipse before? I wonder if you could leverage some of their plugin loading code. That would be awesome.
You could write your own plugin loading code rather easily. Have a plugin directory that your app will scan for plugins. Plugins can essentially be packaged java code. You can place plugins in a jar; they're easy to distribute.
Each plugin could have a very defined structure. For example if you wanted just a dumb simple single action for every plugin and have that single action listed in some plugin Menu in your wordpad app, then have every plugin define doAction(...) getActionName()... and so on. Then you can use reflection and the ClassLoader to load the classes dynamically at runtime.
You can ask me for more details if you don't find it easy to do... I do think that something like eclipse would be best if you can figure out how to get it working with your code.
Ed
Have you used eclipse before? I wonder if you could leverage some of their plugin loading code. That would be awesome.
You could write your own plugin loading code rather easily. Have a plugin directory that your app will scan for plugins. Plugins can essentially be packaged java code. You can place plugins in a jar; they're easy to distribute.
Each plugin could have a very defined structure. For example if you wanted just a dumb simple single action for every plugin and have that single action listed in some plugin Menu in your wordpad app, then have every plugin define doAction(...) getActionName()... and so on. Then you can use reflection and the ClassLoader to load the classes dynamically at runtime.
You can ask me for more details if you don't find it easy to do... I do think that something like eclipse would be best if you can figure out how to get it working with your code.
Ed
•
•
•
•
Originally Posted by nanosani
If I want to add a plugin which I have designed after I have written the software ... how should I do it. Suppose I designed a word pad ... and then I designed a spell checker ... how should I add the spell checker to my word pad to get it working
•
•
•
•
In a world without walls or fences,
What use are Windows and Gates.
Thanks for the great ideas ... I have started implementing like that ... I'll tell you if I get some difficulties.
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
Hey sani,
Have you used eclipse before? I wonder if you could leverage some of their plugin loading code. That would be awesome.
You could write your own plugin loading code rather easily. Have a plugin directory that your app will scan for plugins. Plugins can essentially be packaged java code. You can place plugins in a jar; they're easy to distribute.
Each plugin could have a very defined structure. For example if you wanted just a dumb simple single action for every plugin and have that single action listed in some plugin Menu in your wordpad app, then have every plugin define doAction(...) getActionName()... and so on. Then you can use reflection and the ClassLoader to load the classes dynamically at runtime.
You can ask me for more details if you don't find it easy to do... I do think that something like eclipse would be best if you can figure out how to get it working with your code.
Ed
Dennis
•
•
•
•
I am building a media player and i wish to add mp3 plugins to allow it to play more types of file but i don't know how to set my application up to except plugins.
Dennis
but if you want to play .mp3 files, either check out the JMF or JavaZoom
![]() |
Similar Threads
- News Story: FireFox 3.5, Plugins and The Meaning of Life (Web Browsers)
- Browser plugins through C++ (C++)
- plugins (Ruby)
- Xine plugins - none (*nix Software)
- collecting plugins & more. (IT Professionals' Lounge)
- Any VB.Net plugins that can support fonts that window xp does not support (VB.NET)
Other Threads in the Java Forum
- Previous Thread: recursionFactorial
- Next Thread: Quick Java Problem
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array automation bi binary blackberry block bluetooth character class client code compile compiler component consumer database desktop developmenthelp eclipse error fractal freeze ftp functiontesting game gameprogramming givemetehcodez graphics gui health html ide idea image int j2me j2seprojects java javac javaee javame javaprojects jetbrains jni jpanel jtable julia learningresources lego linked linux mac main map method mobile myregfun netbeans nonstatic notdisplaying number online printf problem program project qt researchinmotion rotatetext rsa scanner screen server set singleton sms sort spamblocker sql string swing system textfields thread threads time title tree tutorial-sample update variablebinding windows working xor






