Installing Java and Netbeans on Linux
Background
There are many variations of Linux, and this install may not cover them all, but...it should cover most of them. You will notice that the instructions are for older versions of Java/Netbeans, but you should get the drift of how to install. If you are using Linux, I am assuming you are comfortable doing a modest amount of sysadmin.
Installing the Java Development Kit (JDK)
Download the Java SDK from https://java.sun.com. On the Sun page, there will be a Java SE link on the right side of the page, select this. You want to choose the Linux self-executing file (jdk-xxx-i586.bin).
Once you have downloaded it to your desktop, you need to install it. In this set of screenshots, I have installed it while logged in as root.
Note the steps below:
Once it is unpacked you should be able to see this:
I set up links to the jdk so that if I update things later on, I don't need to reset paths
Now you need to do something just as important, you need tell the system to use this Java as the default. To do so, you use the "alternatives" command.
At this point you may or may not be done, because there is a bug with Java and newer versions of the kernel. You'll know soon enough when you try to install Netbeans.
Installing the Java Documentation
Go to the Java SE download page at Sun. Toward the bottom of the page there is a Java SE 6 Documentation selection, click on the >>Download button. Accept the license and download the english documentation.
If you don't have the ability to unzip the downloaded file, you can use the jar program in your java installation/bin directory and type jar -xf jdk-6-doc.zip. You should install the zip file in the base java installation directory that you used above.
...and NOW you are done!
Installing the Java EE Tools Bundle with Netbeans 6
Download the Web & Java EE Tools Bundle from https://www.netbeans.org. This bundle includes Netbeans IDE 6.0, the Sun Application Server - GlassFish v2. On the Netbeans download page, there will be a Web & Java EE download button on the the page, select this.
Save out the download, then set the permissions so you can execute the file and unpack it in /usr/local
If you are on Fedora 8, or a new version of the Linux distro, you may/will get the following error at this point.
I'm not going to go into details, suffice to say Linux is updating X windows libraries and Java needs to make a change to work without this error. Fortunately, there is a workaround
Type the set command, and use the directory you installed Java. After you run this command, Java will work fine and you can continue with the Netbeans install with no problems. I'm not going to include every screnshot, but you can see it installs fine.
.