Change the default JDK for NB 6.x
By Randy Carver on Nov 07, 2008
While its easy enough to change the default JDK for a project, in our current project we have around 5 services using 3 or 4 apis and changing the JDK for each is a PITA. Besides, all our builds are setup for command line ant (we build on Solaris, I dev on Linux, OS X and Solaris, and our production boxes are Solaris) and the ant build is setup for JDK 1.6.
So what I really wanted to do was be able to use the ant command line build to build the api's, then pull up the services that I'm working on in NB and not get a library version mismatch.
The file I needed to modify was the netbeans.conf. On a windows box (I think - from the info out there) The file is located in C:\\Program Files\\netbeans-?.?\\etc\\netbeans.conf. On a mac the file is located in Applications/NetBeans/NetBeans ?.?app/Contents/Resources/NetBeans/etc/netbeans.conf
To change the default modify the line:# Default location of JDK, can be overridden by using --jdkhome <dir>:netbeans_jdkhome=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home