Dec 15 2006
HOWTO: Installing Netbeans 5.5 on Ubuntu
Netbeans is not currently available in the Ubuntu/Debian repositories. I believe this is because it uses the Sun CDDL licence which is considered incompatible with the GPL.
However, as an end-user you may wish to use Netbeans despite that. Although it comes with a neat installer wizard I personally prefer to try to get native .deb packages where possible in order to get native package management and menu/launcher icons. I found a debian packaged version by Daniel Baumann. It appears he put it on the Debian new queue but is wasn’t accepted. He’s made the prepacked binaries available here:
http://archive.daniel-baumann.ch/debian/packages/netbeans/5.5-1/
However, I wanted to learn something so I decided to try building a package using the current 5.5 source dist from Netbeans archive and Daniel Baumann’s debian package source. Here are the steps I took.
Building and Packaging Netbeans 5.5 for Ubuntu
1) Grab daniel-baumann’s patch here
2) Get the Netbeans 5.5 source from:
http://www.netbeans.info/downloads/all.php?b_id=2180&src=1
I picked up the ’source’ tgz file from the table of links at the bottom of the page.
3) Untar the sources
-
-
mkdir netbeans
-
cd netbeans
-
tar -zxf netbeans-5_5-ide_sources.tar.gz
-
4) Now apply the patch to the sources
-
-
# first decompress the patch
-
gunzip netbeans_5.5-1.diff.gz
-
cd netbeans-src
-
patch -p1 < ../netbeans_5.5-1.diff
-
The patch simply installs the debian packaging kit into the Netbeans 5.5 src directory. After applying you will find the new files under the newly created debian directory. For more info on what these files do see The Ubuntu Packaging Guide or the Debian New Maintainers Guide.
6) Next build the packages and install
-
-
debuild -uc -us
-
sudo debi
-
When debuild completes there will be 2 .deb files left in the directory above:
netbeans-ide_5.5-1_all.deb
netbeans-platform_5.5-1_all.deb
debi installs both files by reading the netbeans_5.5-1_i386.changes file which will have been generated in the directory above.
