How to Push NetBeans Plugins Silently to End Users?

When we talk, during the NetBeans Platform Certified Training, about the autoupdate feature of the NetBeans Platform, almost without fail someone asks: "Can I also push features, silently, to the end users of my application?"

The scenario is that you have end users who are either (1) not very technical or (2) too busy to use the Plugin Manager, yet you need to distribute new features to them anyway. Or maybe the user has logged in or has paid a special fee for the "professional" version of the software and now additional modules should be made available to them, without them needing to use the Plugin Manager. Short of walking around to all their work stations (kind of tricky if you've created a commercial application bought by 1000s of users off the shelf) and manually installing new features on your own... how do you update the installations of your application? Not a problem if you're using JNLP, i.e., Java WebStart, seeing as you're in control of JNLP applications, since they're on the server. However, let's say you're not using JNLP, how do you solve this problem?

When asked this question, we always refer to the NetBeans Auto Update Services API, which gives you access to a Java API for managing distributions of features, however you'd like that to be done. But, what about an example covering the most typical scenarios?

The related engineer, Jiri Rechtacek, i.e., the AutoUpdate guru on the NetBeans team, has now made a complete sample available, as described here:

https://blogs.oracle.com/rechtacek/entry/silent_update_of_rcp_application

Install the sample described in Jiri's blog entry and then you have the Silent Update sample available:

Next, work through that wizard, shown above, and you'll be asked to provide, among other things, a URL to your update center. I made a small demo update center here, which anyone is free to reuse:

https://blogs.oracle.com/geertjan/resource/newCRUDFeatures.xml

Then, once I had completed the wizard, I added the module to my demo RCP application... I then deployed the application... and then... within a few seconds (based on the code in the sample) the modules from my small demo update center above were silently added to the application! I.e., one window and one toolbar button below appeared magically, without me, as the user, doing anything at all, I didn't even need to restart the application:

Both updates to existing modules and completely new modules are installed automatically, silently, without needing to do anything at all from the user side and without me doing any coding at all, i.e., I simply used the sample installed via Jiri's blog. In this scenario, no Plugin Manager is needed at all, hence no "Plugins" menu item is available under the Tools menu and you, as the provider of the application, have control over the distribution of features to installed applications. By providing the "Silent Update" module in your application, you enable the application to poll your update center at a time of your choice (daily, weekly, at startup, when the user has given you all their money, whatever) for updates and new features for your application... and then, changes having been detected in the update center, the changed/new plugins are installed automatically. Great work Jiri!

Comments:

Last year, I created a silent updater module (based on Jiri's previous blog post) that runs upon startup to do just that with our Customer Service application. It also installs new and updated modules automatically.

Now to figure out how to remove modules no longer available from our update center...

Posted by Derek on June 04, 2010 at 12:16 AM PDT #

hi,
i read this but i have a problem:in my RCP application updates are made only if the module to update is present in RCP with old version>When i want to add new features nothing happen and on the netbeans IDE i can read "none for install" but if i add the maodule in my RCP with a version less than the one of the update everything run ok.i want to know please how can i do to make my application download new independant module and install it.i post the PB to jiri reachtek and he send me the link of this blog but i try as it is explain here but it doesn't work.i don't know if i'm also unlucky i should appreciate any help
thanks
Regards

Posted by Patrick on July 01, 2010 at 01:58 AM PDT #

Get the plugin again, there's been an update to add that behavior. I.e., the first time, the Silent Update module did not contain that additional behavior. In the meantime, it's been added, so you need the latest version of that plugin.

Posted by Geertjan Wielenga on July 01, 2010 at 03:59 AM PDT #

Hi Geertjan, I have a question, is there a posibility to create my own UpdateProvider or something alike, 'cause I'm hosting my update center in google appengine with authentication (uses a form auth method), I need to execute a code before the Netbeans RCP app reaches my xml file, this is the code I need to execute.

http://krasserm.blogspot.com/2010/01/accessing-security-enabled-google-app.html

Except, for this point I'm quite finished with my RCP app.

Thnx again in advance for your time,

Have a great day.

Posted by Alejandro Téllez on September 01, 2010 at 09:18 AM PDT #

I have created a Netbeans Platform application and created .nbm file for each module in my application.Also i have given all those .nbm files to my friend without giving my platform application project(Source code).Can my friend run that application by installing those .nbm files(plugins) in his machine?

Posted by guest on September 05, 2011 at 08:22 PM PDT #

Just create a ZIP distribution by right-clicking the application in the IDE and choose "Package as | ZIP Distribution". Then give that ZIP file to your friend. Not only will the ZIP file contain all the NBMs, but it will also contain launchers for starting the application.

Posted by Geertjan on September 05, 2011 at 08:33 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
24
25
26
27
28
29
30
   
       
Today