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.

NetBeans 6.5 boots with a b'day stamp on splash screen!

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.

Click to enlarge!

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…

Click to enlarge!

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.

Click to enlarge!

Platform Name

You may edit the Platform Name as per your need, or keep defaults and click Finish.

Click to enlarge!

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.

Click to enlarge!

Similarly, doing for 6.1, the following figure shows that I have successfully configured the above NetBeans Platforms,

Click to enlarge!

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.

Click to enlarge!

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.


Thanks to Tom Wheeler (NetBeans Dream Team Member and NetBeans Governance Board Member) for answering my question on the mailing list.