taT | Managing NetBeans Platforms
Recently, I asked a question on NetBeans Developers Mailing List about gaining better understanding of managing NetBeans Platform(s) within the NetBeans IDE.
You didn’t knew that, right? Well, I have also recently discovered that there’s a provision to manage “NetBeans Platforms” for almost every NetBeans Module Project (I guess). Although, I think I knew that this feature was there but never actually devoted time to see what exactly it does.
Yesterday, when I re-discovered this feature and decided to give it a try. I started exploring it and then, faced some issues. So, I raised the above question on the mailing list. I did receive a reply, however it has a different approach to the above problem. Not directly related to scenario’s I came across. As I await more clarification
Now, I got clarification I needed and indeed it should help me understand the way, NetBeans works in this scenario. I thought why not share this scenario with you people. Maybe, you might have faced same issues.
So, how exactly we make use of this feature? Just follow the steps and let me know, what did you observe?
Here are the Tricks,
Firstly, run NetBeans IDE (bundled with either Java SE, Java or All technologies). I am using NetBeans 6.5 FCS for demonstration.
Now, goto Tools | NetBeans Platforms and generally, you would find same platform configured with your NetBeans IDE and that might be possible, only if you are not running any daily builds.
So, this figure might look familiar to you, if the above statements are correct. You can configure several platforms with your distribution. For instance, I have NetBeans 6.0, 6.1 installed, along with 6.5 which I am running. So, I will show you how to configure one of them,
Add Platform…
Choose Platform Folder
This step will let you select the installation directory of other NetBeans distributions and let you configure the platform supplied by them.
Platform Name
You may edit the Platform Name as per your need, or keep defaults and click Finish.
This way you have added platform supplied by NetBeans 6.0 in NetBeans 6.5. Now, switch over to Harness tab and click the 2nd radio button to complete the configuration. This is done to let this platform use its harness to perform tasks related with module projects.
Similarly, doing for 6.1, the following figure shows that I have successfully configured the above NetBeans Platforms,
Now, you know how to add/remove NetBeans Platforms. Lets go further ahead and explore a bit more by taking a typical scenario..
and some tips,
Assuming you made a plug in using NetBeans 6.0 (released in Dec ’07) to be compatible with the same. Soon after NetBeans 6.5 FCS (released Nov ’08) was available, you find that 6.5 work very fast compared to 6.1 and due its improved features, it will help you in reducing your development time.
So, you decide to rework on your module using latest features, however you still want that plug in to work only for NetBeans 6.0, here’s what you need to do.
Firstly, open your plug in project and right-click project node to select its properties. Now, goto Libraries and you would see there’s a drop-down list for selecting your choice of NetBeans Platform, against which you can build your module. This list of platform’s can be configured by clicking “Manage Platforms…” button and you will see the same image, shown earlier.
See how they are all related.. Isn’t it cool? By default, the platform supplied by the NetBeans IDE you are running is selected.
Here’s one thing to keep in mind, that as you are reworking on an old project like this, you must make sure that you configure the NetBeans Platform for it with care, as not doing so will result in failing the build and adding irrelevant versions of module dependencies.
In our case, if you have configured NetBeans 6.0 as demonstrated above, you need to select that from drop-down list and then, select NetBeans 6.0 build to let your module perform tasks against platform supplied with NetBeans 6.0.
When, you run the module project, the above splash screen for NetBeans 6.0 pops up and now, you can see whether your module works or not. Hope this helps!
This blog has been contributed to NetBeans Community Docs Program and for latest updates on this content, refer to the contribution.
Acknowledgements
Thanks to Tom Wheeler (NetBeans Dream Team Member and NetBeans Governance Board Member) for answering my question on the mailing list.









[...] So, you need to configure the project to be built against NetBeans 6.0. Therefore, refer this tips and Tricks to learn how to “Manage Platforms…“. Also, choose JDK 1.5 for Java Platform (JDK [...]
NetBeans Plugins at Kenai | Part 2 « N, Varun
June 10, 2009 at 5:04 pm
[...] News Get to know more about my NetBeans plugins at Kenai and I also shared some tips and Tricks based on NetBeans [...]
#3 | Geertjan Blogs and Kenai « N, Varun
June 16, 2009 at 3:38 pm
Filed a bug report few weeks back;
http://www.netbeans.org/issues/show_bug.cgi?id=167333
See the report for more details in relation to the above.
Varun
June 28, 2009 at 9:24 pm
[...] posts: (automatically generated)Hyperlink Navigation RenaissanceNetBeans Plugins at Kenai | Part 2taT | Managing NetBeans PlatformsNever install NetBeans again! (just use the [...]
Hyperlink Navigation Renaissance | #2 « N, Varun
June 29, 2009 at 8:17 pm
[...] as I had recently found out that NetBeans IDE allows you to manage NetBeans Platform for your NetBeans Module Projects. As per [...]
Multiview Editors and NetBeans « PrayogShala
July 6, 2009 at 4:58 pm
Hi I am not much into reading, but one way or another I got to read lots of articles on your blog. Its remarkable how interesting it is for me to return regularly.
Kerry
January 7, 2010 at 4:22 pm
[...] There you go, you have build your own RCP. Go, get started by adding the newly built platform in your NetBeans 6.X Platform Manager. [...]
Building MyRCP.. « nB gUru
March 17, 2010 at 11:25 pm