Had a lot of fun today trying to get my Netbeans to work on my MacBook. Apple tends to lag behind on Java versions and defaults to JDK1.5 to this very day. In order to use some plugins in Netbeans I needed Java 1.6 to work. At first I tried to set the global Java through the Java preferences application you can find in your utilities. This did not fix my issue since Netbeans ended up using 1.5 anyway. After some googling I stumbled across the following blog post: http://point2blog.wordpress.com/2009/02/17/defaulting-to-jdk-16-in-netbeans-65-on-osx/
What I found there fixed my netbeans without changing the default Java version on my Mac (which can mess up other java applications). What it boils down to is the following:
- Go to “/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/etc/”
- Edit “netbeans.conf”
- Change the “netbeans_jdkhome” to something like “netbeans_jdkhome=
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home”