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:

Share These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • Twitter
  • LinkedIn
  • email
  • DZone
  • Slashdot
  • Reddit
  • Google Bookmarks
  • Digg
  • StumbleUpon
  • del.icio.us
This entry was posted in Java, NetBeans and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Marc
    Posted January 24, 2017 at 11:51 pm | Permalink

    Thanks a lot. Your explanation and solution worked just fine.

Post a Comment

Your email is never published nor shared.

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">