Category

JDK 8, OSX, and Netbeans

Have you installed an Early Access Release of JDK 8? You may want to still use JDK 7 for some projects. I have a JavaFX 2 project that needs JDK 7 since there will be API changes in JDK8.

I’ve previously covered using non Apple JDKs on Mountain Lion. Unfortunately, that doesn’t affect NetBeans default JDK.

When you look at the JDKs in NetBeans, you will see one is the “default”. There is no setting to change it to another JDK. So, if you just installed JDK 8, then that is your default now. You can go to individual project and set which JDK you need for that project. But if you want to set the default JDK, you have to change a NetBeans config file.

Edit this file:

You want to change the key netbeans_jdkhome like this:

Nope, doesn’t work. That’s a shell command and we’re in just a properties file. So, this doesn’t work either:

You need to be explicit.

You can still get the fully qualified path to a particular version of a JDK by typing this in a shell:

One Reply to “JDK 8, OSX, and Netbeans”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.