Building NetBeans 6 Beta 2 from Sources

This short article shows you how you can build NetBeans 6 Beta 2 from sources. I show you the default build.

Contributed by: Amit Kumar Saha


Software Required:

  • Sun Java Development Kit - 1.5 (Please do *not* use JDK 1.6)
  • Apache Ant 1.7.0

Software Configuration:

Make sure you have the following environment variables set:

ANT_HOME = ... # poin to your Ant 1.7.0 installation
JAVA_HOME= ... # point to your JDK 1.5 installtion

Also, see to it that you are able to access your Sun Java Compiler (javac) and Sun Java Interpreter (java) from anywhere on your system. In short, have your PATH set properly

Build Steps:

  • Download NetBeans Beta 2 source bundle (.zip) from here
  • Unzip it to a location, say 'NetBeans-CFF-code'
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code$ unzip 
  • Navigate to the 'nbbuild' directory
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code$ cd nbbuild/
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code/nbbuild$ 
  • Run 'ant' and the build process should start. But before you start, increase the heap size allocated to 'Ant' by:
export ANT_OPTS="-Xmx512m # 512m is the Heap size we are setting; 
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code/nbbuild$ /home/amit/temp-workspace/apache-ant-1.7.0/bin/ant

The build process should succesfully end with the total time taken by the build process displayed.

Using the NetBeans build

Your NetBeans 6 Beta 2 build is ready. Here is how you can use it:

amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code/nbbuild$ cd netbeans/
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code/nbbuild/netbeans$ 
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code/nbbuild/netbeans$ cd bin/
amit@ubuntu-laptop:/media/sda5/Current projects & Research/NetBeans-CFF-code/nbbuild/netbeans/bin$ ./netbeans



  • The above steps are those which worked for me.
  • This document here is a good place to visit for related information.
  • Following the document above, I created a '' file in 'nbbuild' directory and filled it with the contents as suggested above. Unfortunately, the build process failed giving me the following:

[Javac] Compiling 320 source files to /media/sda5/Current projects &
  [Javac] Invalid maximum heap size: -Xmx512m
  [Javac] Could not create the Java virtual machine.
 [Nbmerge] Failed to build target: all-form

Hence, I removed the file.


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo