Sunday, October 14, 2012

Installing Netbeans on Ubuntu 12.04


The catch with doing anything in Java on Ubuntu is always the same - Ubuntu doesn't ship with Oracle’s Java installed. Instead, Ubuntu ships with Open JDK installed. Open JDK is an open source version of Java.

Some may argue that you can develop with and probably run Netbeans with Open JDK. That may be the case, for me I find the Oracle Java to be more trustworthy for production environment so will be using the Oracle bits. This is simply a matter of opinion.

Installing Netbeans on Ubuntu then requires two steps - installing the latest Oracle JDK and then installing Netbeans.

Installing Oracle JDK


Apt-get needs to be configured to point to a ppa that will take care of the heavy lifting. Note that I am running the 32 bit version. The 64 bit version is likely different. Open a terminal and execute the following:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer


Installing Netbeans


  1. Grab the version of Netbeans you are looking for here: http://netbeans.org/downloads/
  2. Use the File Manager to navigate to the Downloads folder and locate the *.sh file.
  3. Make the file executable (you can also do this with chmod +x):
    1. Right-click the file and open Properties.
    2. Click the Permissions tab and check “Allow executing file as program.”
    3. Apply
  4. Rename the file to something easier to manage (i.e. netbeans7.sh)
  5. Open a Terminal and cd to Downloads.
  6. run ./netbeans.sh
  7. Follow the on-screen prompts.
  8. Note that Netbeans will put a shortcut on the Desktop for you.




Sources:

http://www.ubuntugeek.com/how-to-install-oracle-java-7-in-ubuntu-12-04.html

No comments: