NetBeans is my favourite IDE for java development. I’ve been using NetBeans from version 4.1 onwards and I can’t believe that it has progressed and transformed itself so well. Right from version 5.0 onwards, NetBeans has been making amazing strides in terms of developer adoption. And the recent 6.5 release is really fantastic. It’s fast, it’s responsive and got many new cool features. Though I use NetBeans at office which runs on Windows XP, I haven’t tried that yet on my Ubuntu-8.10. So, I thought it’s time to give it a go.
Installing NetBeans in Ubuntu in very easy. The only pre-requisite for installation is to have a suitable JDK on your machine. That too is not a problem if you download the NetBeans + JDK bundle. But I thought of installing them separately. By default, Ubuntu-8.10 doesn’t come with JDK pre-installed, so you have to install it manually. Installing JDK in Ubuntu is just a matter of issuing a “one line” command. Just open your terminal and type:
“sudo apt-get install sun-java6-jdk”
or, if you are a person who prefer GUI more than command line, open your Synaptic Package Manager and look for “sun-java6-jdk” and install it. What surprised me though was the availability of the latest JDK, i.e, “JDK 6 Update 10”. Installing JDK had never been so easy.
(Note: I’m not sure whether sun’s jdk is available in the default Ubuntu repositories. You may have to enable universe/multiverse repositories if you don’t find the package “sun-java6-jdk”)
TIP: To ensure faster download of JDK, configure the fastest mirror near your location. To do that, open “System -> Administration -> Software Sources” and look for a drop down box called “Download from”.
The installation process of JDK will ask you to accept a license agreement. Once you agree it, JDK will be installed in your system. I’ve installed JDK 5 previously in old versions of Ubuntu but I had to change some files to configure the default JDK. But this time, I did nothing and after installing the JDK, I went to the terminal and typed “java -version” and found everything to be setup correctly.
I thought of installing NetBeans 6.5 also the same way, but I found only NetBeans 6.1 in Synaptic. So, I decided to download NetBeans 6.5. After downloading, I opened the terminal, navigated to the download directory and issued the command “sh netbeans-6.5-ml-javase-linux.sh” to initiate the install process. Kindly note that “netbeans-6.5-ml-javase-linux.sh” is the name of the file I downloaded. This might change depending on the version/pack you downloaded.
And within a couple of minutes, NetBeans was ready for use on my machine. And this is how it looked, when I opened it.