• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating a system that can work with plug ins

 
Ranch Hand
Posts: 106
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

I want to implement a Java application with plug in function

Does any one know where to start.I don’t even know how to do it.

I have good knowledge of Java but never came on something like that any ides help tips where to start or how to implement it .

in some words how this will work is that It will be an application that run on web or not and some one can add plug ins with functionality s (new tools new functions new styles) if not maybe then it can be implement on a desktop application and how ?

how should i start?
After a lot of research i cannot find something to start any ideas where to?
How to create something that accepts plug ins to work.All the help is most welcome


thanks in advance
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Horche Gratsias wrote:I want to implement a Java application with plug in function
...
I have good knowledge of Java but never came on something like that any ides help tips where to start or how to implement it .


Interesting question.

I've never tried it - at least not in the way that I think you mean, but my first thoughts on the subject seem to be borne out by this page.

First: you have to come up with a protocol - by which I mean a set of methods or interfaces that ALL plugins have to adhere to.

Second: You'll need to design your project around interfaces rather than classes.

Third: You'll probably need some form of "registration" mechanism, so that existing code understands which plugins it actually has to work with.

As for the mechanics: Dunno; never tried it. But I suspect that you'll be spending a lot of time in the "abstract".

Winston
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well the whole have Java servlets API is built around this very idea. It allows you to develop some piece of code that can service HTTP requests and plugin to the web container. You might want to study web containers more and borrow some ideas.


 
Rancher
Posts: 43081
77
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I may strut my own stuff, start here: http://www.javaranch.com/journal/200607/Journal200607.jsp#a1

That's a lightweight approach, though. For heavy-duty stuff you'd use OSGi these days.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ServiceLoader is another useful tool that can be used these days to discover the plugin implementation classes, combined with a class loader to load the classes.
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:If I may strut my own stuff, start here: http://www.javaranch.com/journal/200607/Journal200607.jsp#a1


Wow. Some page; and right on point. My kudos.

Winston
 
Georgios Chatziefstratiou
Ranch Hand
Posts: 106
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys thanks for your help and suggestions.

I will look all your link sites and give you feedback.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:If I may strut my own stuff, start here: http://www.javaranch.com/journal/200607/Journal200607.jsp#a1

That's a lightweight approach, though. For heavy-duty stuff you'd use OSGi these days.



That was fascinating. Thanks for that article.

 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are complete frameworks such as OSGi and the Netbeans module framework which help you to create applications that can have plugins, complete with auto-update mechanisms etc. You might want to look into those, although they're both not frameworks that are really easy to understand.
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been struggling to create a NetBeans plugin, but the learning trail at netbeans.org doesn't work with 7.2. There is a bug in 7.2 that prevents junit from installing and the GoogleToolbar tutorial example depends on it. I've spent the last 3 days looking for a solution to the junit problem and it appears that I'll have to wait for 7.3.

If you know of any articles/sites/books about netbeans plugin development, please point me in the right direction.

 
Georgios Chatziefstratiou
Ranch Hand
Posts: 106
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jk Robbins wrote:I've been struggling to create a NetBeans plugin, but the learning trail at netbeans.org doesn't work with 7.2. There is a bug in 7.2 that prevents junit from installing and the GoogleToolbar tutorial example depends on it. I've spent the last 3 days looking for a solution to the junit problem and it appears that I'll have to wait for 7.3.

If you know of any articles/sites/books about netbeans plugin development, please point me in the right direction.


yes i have notice that many code samples from netbeans.org don't work I really don't understand why ?
I still have to read all the material people said me here in forum when i am at the end i will give the feedback for all of them.
 
Georgios Chatziefstratiou
Ranch Hand
Posts: 106
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi people .
thanks a lot for your help .
After Reading a lot the only think i can say is that the simplest way to do an application is by using the Netbeans pltaform or Eclipse platform.

I have read all the tutorials you give me and it's very hard to design it . The best way to do it is by using one of this platforms and olny for desktop applications.On something about web application it's even harder.
Alternative is to use a framework like play or something like that, then the best ways to implement it is by adding a new view on the current view.Hard to explain .Try to play Travian for example and you will understand it .



Thanks a lot for your help.
 
I love a good mentalist. And so does this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic