Bye NetBeans IDE

It's high time and long overdue, yet here are instructions on how to get started using the NetBeans Platform... without using NetBeans IDE.

  1. Download the NetBeans Platform. Go here, download it, and unzip into a folder:

  2. Download the NetBeans Platform Build Harness. Into the same folder where you downloaded the above, unzip this:

    You now have the NetBeans Platform as well as its build harness. Let's start using it.

  3. Set Up a Project. In a different folder to where the above two have been unzipped, create a folder named "DemoApp". Inside "DemoApp", create a folder called "nbproject" (so that you'll be able to open the project, sometime in the future when you might want to do so, into NetBeans IDE). Inside the 'nbproject' folder you only need to put three files:


    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="">
            <data xmlns="">

    The '' above points to the folder where I unzipped the two downloads into.


    <?xml version="1.0" encoding="UTF-8"?>
    <project name="DemoApp-impl" basedir=".." xmlns:sproject="">
        <property file="nbproject/"/>
        <macrodef name="property" uri="">
            <attribute name="name"/>
            <attribute name="value"/>
                <property name="@{name}" value="${@{value}}"/>
        <macrodef name="evalprops" uri="">
            <attribute name="property"/>
            <attribute name="value"/>
                <property name="@{property}" value="@{value}"/>
        <sproject:property name="harness.dir" value="nbplatform.${}.harness.dir"/>
        <sproject:property name="" value="nbplatform.${}.netbeans.dest.dir"/>
        <sproject:evalprops property="cluster.path.evaluated" value="${cluster.path}"/>
        <import file="${harness.dir}/suite.xml"/>

    The above files, within the 'nbproject' folder, are all that's needed to hook the 'platform' and 'harness' downloads into your project.

  4. Add a Build Script. On the same level as the 'nbproject' folder, i.e., the root directory, add your build.xml file. A starting point would be as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="DemoApp" basedir=".">
        <description>Builds the module suite DemoApp.</description>
        <import file="nbproject/build-impl.xml"/>

That's it. Go to the project's root directory and do 'ant run'. The NetBeans Platform will start up and you'll see the main window. When troubleshooting the above scenario, make sure the 'platform' and 'harness' folders are really in a different folder to where the 'DemoApp' is in, e.g., 'home/nbplatform/platform' and 'home/nbplatform/harness', with 'home/mywork/DemoApp' is what is needed.

Next time, we'll look at how to add a module to the application.


Is there a way this could be accomplished via a Maven archetype instead (no Ant build.xml)?

We use Maven as our build system, which is one of the main reasons we're not tied to a particular IDE going forward.

Posted by Jacek on June 18, 2010 at 07:16 AM PDT #

Hi Jacek!

Yes, the NetBeans platform is available as maven artifacts. I build my rcp projects with maven and hudson (in conjunction with artifactory).

br, josh.

Posted by Aljoscha Rittner on June 20, 2010 at 05:49 PM PDT #

That post title was too shocking for me. Please be careful - you could cause heart attacks...

Posted by Martin Wildam on June 20, 2010 at 10:04 PM PDT #

Martin> Yes, mee too!

Posted by NicolasDumoulin on June 21, 2010 at 07:19 PM PDT #

Thanks, that was really useful!

I found a way for having the nbplatform folder in the project folder and not to have to put an absolute path as active dir. Simply add this at the top of your build.xml file:

<property name="" value="${basedir}/nbplatform" />

And set your like this:${suite.dir}/nbplatform

Posted by mathieu on November 03, 2011 at 01:09 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« June 2016