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 netbeans-4_1-platfirm.zip. 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.
- 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
- 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.
- 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.
- 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.
- 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.
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.