2013-04-26 Linux
Installation of NetBeans in Ubuntu or Debian is very easy but before you do so, you have to install Java JDK which is required by NetBeans to work.
Go to Oracle’s Java SE Development Kit 7 Downloads, accept License Agreement and download proper version of JDK in tar.gz file. Now unpack file to destination showed below (remember to change file / directory name if version is different – this example is for 7u21). If destination directory (jvm) does not exist, create it:
cd /usr/lib sudo mkdir jvm
Now unpack:
tar zxvf jdk-7u21-linux-x64.tar.gz -C /usr/lib/jvm/
Now use “update alternatives” to set newly installed JDK priority value to the highest level:
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_21/bin/java 1099 update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_21/bin/javac 1099
Check it by typing:
update-alternatives --config java
You’ll see:
Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/jvm/jdk1.7.0_21/bin/java 1099 auto mode 1 /usr/bin/gij-4.4 1044 manual mode 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode 3 /usr/lib/jvm/jdk1.7.0_21/bin/java 1099 manual mode
Due to the highest priority that we’ve set, this JDK will be used. Check Java with:
java -version
Download version which you want to use and do the final step. Just add permission to execute downloaded file:
chmod +x netbeans-7.3-linux.sh
Run install process by entering:
./netbeans-7.3-linux.sh
Next, a graphical window will appear. Choose “next” and proceed through all steps. This tutorial works on Debian as well as on Ubuntu. Tested on 13.10.