Skip to main content

Running With the Netbeans Platform

This is the second of two posts documenting the creation of a Netbeans module, and running it stand-alone on the Netbeans Platform. The first post was Newbee NetBean Module Creation. It's been over a month since that first post, and a lot longer than I intended. Unfortunately life intruded. I'm now on vacation (working around the house on my infinitely long honey-do list) and making the odd post. I've now caught up somewhat and I can relax and look at my other lists of things to do, such as this series.

The Netbeans Platform is the equivalent of the Eclipse Projects Rich Client Platform (or RCP SDK). The significant difference between the Netbeans Platform and the RCP is that the Netbeans Platform will run out-of-the-box (although it is very dull at that point) while the RCP must be combined with a Eclipse plugin and configured to run as a complete application (although this is not hard to do). The Netbeans Platform appears at first blush to be easier to work with.

You need to get the Netbeans Platform. When you go to the download page, make sure to select release 4.1, that you select the release version, and then select the platform you're running on (Windows, Linux, etc). For this example I'm running on Windows, so I'll install And as before, it will be installed in my Java work area, C:\Java. In addition, I have created an empty work user directory, C:\Java\nb_test.
  1. To install the Anagrams plug-in/module into the NetBeans Platform, you need to run the platform. Go to the directory where the NetBeans Platform distribution was extracted.
    Change directory into netbeans\platform5\lib (in my case, C:\Java\netbeans\platform5\lib). In this directory is a Windows binary called nbexec. So that you don't collide with the NetBeans settings in your .netbeans directory, you should pass the --userdir [test_dir] arg to nbexec. For instance, to set the C:\Java\nb_test as the userdir for the NetBeans Platform (as well as to just test the platform), you would execute:
    C:> nbexec --userdir C:\Java\nb_test
  2. To illustrate how lightweight the NetBeans Platform is, select the File > View Toolbars and select the checkbox next to Memory. You will now see a Java heap memory usage meter in the NetBeans Platform toolbar. The NetBeans Platform is only using a small amount of Java heap. In this example, it's about 7 meg.

  3. To add the Anagram plug-in / module, select the Tools > Update Center menu item. Click the radio button "Install Manually Downloaded Modules (.nbm Files) and press the Next button.

  4. Click on the Add button and traverse to the directory where you created your Anagram project back in Step 5 of the first post. In the Anagram project directory you will find the an anagrams.nbm file. Select this file and press Ok. Click the Next button. Click the Next button again. The NetBeans Platform will install the anagrams plug-in / module very quickly. Press the Next button again. Check the box next in the "Include" column. The NetBeans Platform will tell you this module is an unsigned plug-in/module and ask if you want to install it anyway. Say, "Yes" to proceed with the installation. Then, press the Finish button.

  5. You will now see a "Games" menu in the NetBeans Platform (see the image at step two above). Go ahead and click on the Games menu and select Anagrams.
One of the advantages of installing plug-ins / modules in the NetBeans IDE is that you can use the NetBeans tools such as the debugger to help debug the plug-in. One of the things you'll need to do in order to re-install the plug-in as you go through the code, compile, test, debug cycle is to remove the old plug-in and its metadata in NetBeans. Unfortunately, you have to do this manually.

If you are working with the NetBeans Platform and you want to remove the plug-in so you can re-install a different one, go to the directory you specified as the --userdir. Above we used C:\Java\nb_test. You will need to remove the following files:

If you are working with the NetBeans IDE and you want to remove the Anagrams plug-in after you have added it to the NetBeans IDE, go to the C:\Documents and Settings\[username]\.netbeans directory and remove the following files:

After you have removed these files you will be able make changes to your plug-in / module, rebuild it and re-install it.


Popular posts from this blog

cat-in-a-box channels greta garbo

So I'm sitting at my computer, when I start to notice a racket in back. I ignore it for a while until I hear a load "thump!", as if something had been dropped on the floor, followed by a lot of loud rattling. I turn around and see Lucy in the box just having a grand old time, rolling around and rattling that box a good one. I grab the GX1 and snap a few shots before she notices me and the camera, then leaps out and back into her chair (which used to be my chair before she decided it was her chair).

Just like caring for Katie my black Lab taught me about dogs, caring for Lucy is teaching me about cats. She finds me fascinating, as I do her. And she expresses great affection and love toward me without coaxing. I try to return the affection and love, but she is a cat, and she takes a bat at me on occasion, although I think that's just her being playful. She always has her claws in when she does that.

She sits next to me during the evening in her chair while I sit in mi…

vm networking problem fixed

Over the weekend I upgraded to Windows 8.1, then discovered that networking for the virtual machines wouldn't work. Then I tried something incredibly simple and fixed the problem.

Checking the system I noticed that three VMware Windows services weren't running; VMnetDHCP, VMUSBArbService, and VMwareNatService. VMware Player allows you to install, remove, or fix an existing installation. I chose to try fixing the installation, and that fixed the problem. The services were re-installed/restarted, and the virtual machines had networking again.

Once network connectivity was established there was exactly one updated file for Ubuntu 13.10, a data file. This underscores how solid and finished the release was this time. Every other version of every other Linux installation I've ever dealt with has always been succeeded by boatloads of updates after the initial installation. But not this time.

Everything is working properly on my notebook. All's right with the world.

sony's pivotal mirrorless move

I'm a died-in-the-wool technologist, even when it comes to photography. I have always been fascinated with the technology that goes into manufacturing any camera, from the lenses (optics) through the mechanical construction, the electronics involved, and especially the chemistry of the film and the sophistication of the digital sensor. It's amazing that the camera can do all it's asked of it, regardless of manufacturer.

Of all the types of cameras that I've really taken an interest in, contemporary mirrorless (again, regardless of manufacturer) are the most interesting because of the challenging problems the scientists and engineers have had to solve in order to build a compact but highly functional camera. In particular I've followed the sensor advances over the years and watched image quality climb (especially with μ4:3rds) to exceed film and rival one another such that there's very little difference any more as you move from the smaller sensors such as 4:3r…