943,510 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 3046
  • Java RSS
Aug 19th, 2004
0

Plugins

Expand Post »
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
Similar Threads
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Aug 20th, 2004
0

Re: Plugins

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

Quote 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
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004
Aug 20th, 2004
0

Re: Plugins

Thanks for the great ideas ... I have started implementing like that ... I'll tell you if I get some difficulties.
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Nov 20th, 2008
0

Re: Plugins

Click to Expand / Collapse  Quote originally posted by cosi ...
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
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sethgeco is offline Offline
1 posts
since Nov 2008
Nov 21st, 2008
0

Re: Plugins

Click to Expand / Collapse  Quote originally posted by sethgeco ...
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
after 4 years, nobody is still reading this thread.
but if you want to play .mp3 files, either check out the JMF or JavaZoom
Reputation Points: 919
Solved Threads: 352
Nearly a Posting Maven
stultuske is offline Offline
2,471 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: recursionFactorial
Next Thread in Java Forum Timeline: Quick Java Problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC