Pretty easy, here you go:
sudo apt-get install openjdk-6-jdk
Installing NetBeans without JDK 1.5+
Get the current JDK flavor you want, and you will need to start the program the following way:
C:
CD "C:\Java\NetBeans 6.7\NetBeans 6.7\bin"
netbeans.exe --jdkhome "C:\Java\jdk1.6.0_14"
The --jdkhome switch is the "special sauce" that makes it work.
