Geertjan's Blog

  • July 27, 2006

How to Include the IDE's Update Center Module in a NetBeans Platform Application

Geertjan Wielenga
Product Manager
I got an e-mail from Kai Tödter at Siemens this morning, with this question (among others): "Is there an online article how to include and use the AutoUpdate in own applications?" Well, there is now... here it is. It starts with the assumption that you have nothing at all. At the end, you have an empty application (ready for Matisse and the other cool tools in the IDE), but including functionality provided by NetBeans IDE's Update Center module. Read on, if this is functionality that you would like to make available to your own application.

Create a rich-client application.

  1. File > New Project > NetBeans Plug-in Modules > Module Suite Project. Click Next.

  2. Project Name "TestApp" and put it in any project location of your choice. Click Finish.

  3. Right-click the "TestApp" node and choose Properties. In the "Application" panel, click "Create Standalone Application". Click Exclude. Click OK.

  4. Right-click the "TestApp" node and choose Run.

  5. The application starts up. Look under the Tools menu:

    No "Update Center" menu item! It isn't a menu item that belongs to the NetBeans Platform. It is a menu item that belongs to NetBeans IDE. So we need to tell the application to include the module that will provide the NetBeans IDE's Update Center functionality (menu item, wizard, Module Manager). Close the application and go back to the IDE.

Include the module that provides the Update Center functionality.

  1. Right-click the "TestApp" node. Choose Properties. In the Libraries panel, expand the nb5.5 node. Click the nb5.5 checkbox. All the subnodes are now selected. Unselect all of them, except "Update Centers".

  2. Now the IDE helpfully tells you in red text that you need the "Auto Update" module in the "platform 6" cluster (which is a collection of related modules):

    So, expand the "platform6" cluster and select "Auto Update". No red text appears, so your dependencies are satisfied. Click OK.

  3. Right-click the "TestApp" node and choose "Clean and Build All".

  4. Right-click the "TestApp" node and choose Run.

  5. The application starts up again. Look under the Tools menu:

    There's the "Update Center" menu item! (And the "Module Manager" menu item for installing/uninstalling and enabling/disabling modules.) Hurray. Now choose the menu item and install modules, either available locally on your system or on-line via someone's Update Center. Elsewhere in this blog (here) you can see how to register someone else's Update Center.

Join the discussion

Comments ( 6 )
  • Ivan Thursday, July 27, 2006
    Excellent! It would be interesting to read about using Update Center features without its GUI (e.g., to implement own one).
  • Geertjan Sunday, July 30, 2006
    So you want to create your own user interface for working with the Update Center? I can investigate how to do thi, but what's your use case (i.e., why do you want to do this)?
  • Ivan Sunday, July 30, 2006
    It \*would\* be our customer's requirement. But now it is just evaluation of the Platform features.
  • Kai Tödter Monday, August 21, 2006
    Thanks Geertjan, it works well! Right now I am trying to figure out how I maintain and configure my own update center specific to my rich client applications.
    Best regards,
  • Geertjan Monday, August 21, 2006
    Hi Kai! You mean that you want the Update Center to look different to the standard way? (What is wrong with the standard Update Center wizard that you need to create a separate one for your own application? You should be able to simply reuse the module from NetBeans IDE, without needing to change it. Or am I missing something?)
  • Kai Tödter Monday, August 21, 2006
    Hi Geerjan,
    I just want to use my own update center for my application. Right now I am following your great tutorial on this topic: http://blogs.sun.com/roller/page/geertjan?entry=publish_plug_ins_painlessly2
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.