How to specify Java Home on Mac OS X
After applying Software Update Java for OS X 2012-006 1.0 - http://support.apple.com/kb/HT5493 - Mac OS X users are no longer able to use the Java Preferences application to specify the version of Java that is used by applications. After applying the update, NetBeans IDE runs on the most recent version of Java that is installed, with Java SE 6 as the minimum required version.
To change the Java Home that is used by the IDE to a version of Java that is not the most recent version you should specify the version in the netbeans.conf configuration file.
Step by step:
- Open any editor
- Press CMD+O (to open the "Open Dialog Windows")
- In the opened window press CMD+SHIFT+G (to enter the path manually)
"/Applications/NetBeans/NetBeans 7.3 Beta 2.app/Contents/Resources/NetBeans/etc/netbeans.conf"or
"/Applications/NetBeans/NetBeans 7.3 Beta 1.app/Contents/Resources/NetBeans/etc/netbeans.conf"or
"/Applications/NetBeans/NetBeans 7.2.app/Contents/Resources/NetBeans/etc/netbeans.conf"or whatever version of NetBeans you've got, and press ENTER (or click on "Go" button)
- Press ENTER again (or click on "Open" button)
- In the
netbeans.conffile, search the line that looks like this
- Under this line add
- Press CMD+S to save the document.
Applies to: NetBeans IDE 7.2 or later
Platforms: Mac OS X 10.7 or later