First you need Java SE 6 - the old one. You can download it here.
Then you have to say your Netbeans to use the right java version like described here:
- go to /Applications/NetBeans/, click on the file Netbeans 7.3, open
its context menu and select the option "Show Package Contents".
- In the package, navigate to /Contents/Resources/NetBeans/etc and edit the file netbeans.conf.
- Uncomment the variable netbeans_jdkhome and set its value like that:
netbeans_jdkhome="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home".
That's it.
If you are developing in java you may now run into following error:
Unsupported major.minor version 51.0
So keep reading this article:
- go to the menu Tools / Java Platforms to see a dialog as shown in the figure below.
- add other JDKs you have installed. My JDK 1.7, for instance, is located at:
/Library/Java/JavaVirtualMachines/jdk1.7.0_##.jdk/Contents/Home. Yours is probably somewhere there too.
Hope that helps you with this issue and without downgrading your Java SE.
Attention: this won't work with Netbeans 7.4+, because it needs Java SE 7 to run at all.