Install NetBeans IDE 7.3 with jdk 7 on Ubuntu CentOS RHEL Fedora

Overview

NetBeans IDE is FREE, open source, and has a worldwide community of users and developers. It helps one quickly and easily develop desktop, mobile and web applications with Java, HTML5, PHP, C/C++ and more. To know about all available features click here

Install NetBeans IDE 7.3 with jdk 7 on Ubuntu CentOS RHEL Fedora

NetBean require JDK to be installed first so lets install it

http://www.oracle.com/technetwork/java/javase/downloads/index.html


# tar zxvf jdk-7u21-linux-x64.tar.gz
# mkdir /usr/java
# mv jdk1.7.0_21/ /usr/java/

On CentOS, RHEL. Fedora


# alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_21/jre/bin/java 2000

On Debian, Ubuntu


# update-alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_21/jre/bin/java 2000

Verify java version


# java -version

java version “1.7.0_21″
Java(TM) SE Runtime Environment (build 1.7.0_21-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

If you see some other version then use alternatives --config or update-alternatives --config to select the correct version.

On CentOS, RHEL, Fedora

# alternatives --config java

There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/java/jdk1.7.0_21/jre/bin/java

Enter to keep the current selection[+], or type selection number: 2

As you can see that I also have openjdk 1.6 installed and active(java with [+] is currently in use). Selecting the second program will make the latest 1.7 active, you can run java -version to verify it.

On Debian, Ubuntu

# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/java/jdk1.7.0_21/jre/bin/java 2000 auto mode
1 /usr/java/jdk1.7.0_21/jre/bin/java 2000 manual mode
2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode

Press enter to keep the current choice[*], or type selection number:

Next download the latest version of netbeans


$ wget http://download.netbeans.org/netbeans/7.3/final/bundles/netbeans-7.3-linux.sh

Make the script executable


$ chmod +x netbeans-7.3-linux.sh

Start the installation


$ sh netbeans-7.3-linux.sh

netbean01 300x250 Install NetBeans IDE 7.3 with jdk 7 on Ubuntu CentOS RHEL Fedora

netbean03 300x187 Install NetBeans IDE 7.3 with jdk 7 on Ubuntu CentOS RHEL Fedora

netbean02 300x250 Install NetBeans IDE 7.3 with jdk 7 on Ubuntu CentOS RHEL Fedora

To launch netbeans using the command shell.


$ /usr/local/netbeans-7.3/bin/netbeans

netbeans04 300x176 Install NetBeans IDE 7.3 with jdk 7 on Ubuntu CentOS RHEL Fedora

To uninstall netbeans from your system.


$ /usr/local/netbeans-7.3/uninstall.sh