Plug-in modules are packaged for delivery in binary format. The file extension of plug-in modules is .nbm. An NBM file is very similar to a JAR file, with only a few differences. The main differences between NBM files and JAR files are:
The IDE uses an Ant script to create NBM files. Therefore, you do not need to worry about the exact contents of an NBM filejust let the standard Ant build script for NBM creation take care of it for you. To create an NBM file:
If you are developing a module suite project, you have several additional choices to make. You can upload an image that will be used as the application's splash screen. In addition, you can set the name of the executable, which is the binary that the user actually starts, and the application's title bar. You can also let the IDE create a ZIP file of your application. When the IDE creates the ZIP file, it also creates a launcher, which it includes in the ZIP file. Finally, you can let the IDE create a JNLP file so that the application can be started over the Internet. Once you have packaged a plug-in module, you can distribute it via an Update Center. To put together an Update Center, you must create an autoupdate descriptor that provides information about the plug-in module, such as the location of the NBM file and its module dependencies. An autoupdate descriptor is an XML file with a specific structure and content. After placing the autoupdate descriptor and the NBM files on a server, you must make the URL to the autoupdate descriptor available to your target audience.
The URL looks similar to the following: http://www.netbeans.org/my_autoupdate_center.xml The target audience must then register the new autoupdate center by specifying the URL to the autoupdate descriptor in the Options window, as shown in Figure 17-12. Figure 17-12. Registering an autoupdate descriptor in the Options windowOnce NetBeans IDE knows the URL to the autoupdate center, you use the Update Center wizard to access the NBM files, as shown in Figure 17-13. Figure 17-13. Getting a plug-in module from an update centerUpdates to plug-in modules can be distributed in the same way. When you have developed a new version of a plug-in module, you can make it available via your Update Center. The same approach can be used for distributing modifications and patches to rich-client applications. |