Revision as of 18:29, 6 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

04.02.08 - This guide has been produced by L.Tambiah (Flossgeek).

[[{TableOfContentsTitle=TableOfContents} | {TableOfContents title='Table of Contents'}]]


The guide will cover installation of the Java(TM) Development Kit 6.0 and NetBeans 6.0 on Ubuntu 7.10 code name Gutsy Gibbon release. Before commencing download NetBeans 6.0 to your desktop.

Steps To Reproduce

Installing JDK 6.0

Fortunately installing the Java(TM) Development Kit on Ubuntu is a breeze!

1. Ensure your repository's are up-to-date. In the Terminal (found in Applications>Accessories Menu on GNOME desktop):

$sudo apt-get update

2. Install the JDK 6.0 and Java-plugin for Firefox using the terminal:

$sudo apt-get install sun-java6-jdk sun-java6-plugin

*Note this will take a while depending on your connection speed.

Update Java(TM) Alternatives

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

sudo update-java-alternatives -s java-6-sun

4. Open the jvm file located at /etc/jvm:-

gksudo gedit /etc/jvm

5. Now add the line "/usr/lib/jvm/java-6-sun" to the top of the entries, then save and exit. The file should look something like this below:-


This step ensures that the Sun JVM is the default JVM used by NetBeans.

Check The Java(TM) Environment

6. You can check the Java(TM) Environment has been installed and set up correctly by doing the following command in the terminal:

java -version

If all is well the output from the above command should be similar to below:-

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

Installing NetBeans 6.0

Use the NetBeans installer you downloaded earlier to your desktop to install NetBeans 6.0. Depending on the version of NetBeans downloaded will depend on your file name! Open a terminal and change directory to the desktop:

cd Desktop

Check your file name is present by issuing a list command:-

ls -l

Still in the same terminal install Netbeans 6.0:

sudo ./

Now a dialogue box will pop up asking for your preferred options. When the options are presented for your NetBeans install location /opt is usually a good place, and the same goes for the server (if you installed the J2EE bundled version that is). If in doubt see the images below!

If you see a blank grey window after running the netbeans installer shell script and see the following message:

/usr/share/themes/Glossy/gtk-2.0/gtkrc:35: error: lexical error or unexpected token, expected valid token

This is a problem involving visual effects. Temporarily disable them in Gnome by going to System :: Preferences :: Appearance :: Visual Effects, and selecting none. You will still see the error message but a installation wizard will appear and you will be able to install Netbeans.

  • Enter your preferences


  • Server Location


When all has been done hit "install" and then wait for a while and finally click the "finish" button. To run NetBeans either run from your /opt/netbeans6.0/bin directory or create a menu link using the "Main Menu" tool in Ubuntu (System>Preferences>Main Menu).

Look And Feel

You may notice that NetBeans 6.0 implements a GTK interface to integrate into your current GNOME desktop, however there are some things that aren't quite right yet, such as the drop down menus button and most importantly the overall speed. If you want to change the theme back to the Java(TM) cross-platform look and feel see Netbeans Hacks.

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