This guide was written by L. Tambiah Updated by ehsavoie.



This guide shows you how to install NetBeans on your Ubuntu desktop. First you must install the Java Development Kit (JDK) so NetBeans can run, compile and execute Java programs. * We presume you are using Ubuntu Feisty 7.04. There is curently an unsupported depot that allows you to install Netbeans 6.0 using simply apt. It is not official but far easier.

Steps To Reproduce

Install Java(TM) - JDK

1. First ensure your repositories are up-to-date by issuing the following command in the terminal:-

sudo apt-get update

2. Install the Java(TM) development Kit and the Java(TM) plug-in:-

sudo apt-get install sun-java5-jdk sun-java5-plugin

If you would like to run the Java 6 version simply do the same as above and replace the number 5 with 6.

Update Java(TM) Alternatives

1. Update the Java(TM) alternatives so Suns virtual machines is the default:-

sudo update-java-alternatives -s java-1.5.0-sun

2. Finally open the jvm file located at /etc/jvm:-

gksudo gedit /etc/jvm

Note if you prefer vim just issue "sudo vim /etc/jvm". We use gedit for ease of use.

Add the line "/usr/lib/jvm/java-1.5.0-sun" to the top of the entries. For java 6 it would be "/usr/lib/jvm/java-6-sun".

Test The Java(TM) Environement

1. Test the Java(TM) Environment is set up corrcectly by running:-

java -version

An output simular to below should be displayed if all is correct.

java version "1.5.0_08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)...........

Install NetBeans IDE

NetBeans is open source and licensed under the CDDL and in the near future we should see a full GPL'ed Java(TM) development stack too.

Download NetBeans from the main download page, the latest stable version at the time of writing this guide is 5.5.1. The download page offers different versions, you can have NetBeans standalone, NetBeans with the JDK (which we do not want as we have just installed it) and NetBeans Tools Bundle. I choose the latter as it has a server included which I will require in the future for web applications. I should also mention that if you install the NetBeans standalone version you can add the server later (but this won't be covered here).

Download NetBeans to your desktop ready to install! Hopefully you will see the NetBeans installer file sitting on your Desktop, I will pretend it is called myNetBeansInstall.

Lets install this via a terminal, you will first need to change directory to your desktop location:-

cd Desktop

Do a list(ls) command to check the file is present. Finally still in the terminal install NetBeans:-

sudo sh myNetBeansInstall

Now follow the prompts, the installer should install NetBeans into the /opt directory, this is fine and is the ideal location for optional installs. The application server is also located there.

Easy unofficial installation

This is a translation from the french Ubuntu wiki .

Add the following depot :

deb gutsy main

The you have to install this new depot key :

gpg --keyserver --recv-keys AA82C25A36399439
gpg --armor --export AA82C25A36399439 | sudo apt-key add -

Don't forget to update tour package list

sudo apt-get update

And voila you are done :o). Now you just have to choose what to install :

Name Package
Java netbeans6-java
J2EE netbeans6-j2ee
UML netbeans6-uml
C/C++ netbeans6-cpp
Ruby netbeans6-ruby
Mobility netbeans6-mobility
Soa netbeans6-soa

And for the runtimes :

Runtime Package
Glassfish V2 netbeans6-glassfish
Open ESB netbeans6-openesb
Tomcat 6.0.14 netbeans6-tomcat
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