Rongeegee
Rongeegee

Reputation: 1128

How do I stop NetBeans from "popping up "invalid jdkhome specified" window

enter image description here

I previously had JDK 9 installed. Because of the issue NetBeans has with JDK 9, I deleted JDK 9 from my computer and installed JDK 8. Now, Netbeans doesn't have any issue anymore, except that it pops up this window whenever I open NetBeans. If I click yes on window, everything works fine. It just bothers me I have to click it every time I open NetBeans.

Upvotes: 2

Views: 996

Answers (1)

skomisa
skomisa

Reputation: 17383

As the link in the OP comment points out, the cause of the problem is almost certainly an invalid value for netbeans_jdkhome in file netbeans.conf:

netbeans_jdkhome="C:\Java\jdk1.8.0_161"

Make sure that the string value references a valid JDK8 installation. (File netbeans.conf resides in the etc directory directory directly under the NetBeans installation directory.)

However, there are also a couple of other configuration settings worth checking:

  • Select Tools > Java Platforms and verify that the Platform Folder is valid:

JavaPlatform

  • Select Tools > NetBeans Platforms and verify that the Platform Folder is valid:

platformManager

As a related issue, although NetBeans 8.x does not support Java 9, you can download a beta version of Apache's NetBeans 9, which supports both Java 9 and Java 10, from the Apache NetBeans site. Note that:

  • Installing NetBeans 9 has no impact on your NetBeans 8.x installation.
  • You can safely run NetBeans 8.x and NetBeans 9 concurrently.

Update:

Try the following if you get an "access denied" error when updating netbeans.conf on Windows:

  • Close NetBeans, then open netbeans.conf in Notepad.
  • Make your changes and then save the file to any temporary location such as C:\temp.
  • In Windows File Explorer move that file you just created to the NetBeans 8.x target directory (e.g. C:\Program Files\NetBeans\etc) to overwrite the existing version of netbeans.conf.
  • Restart NetBeans.

Upvotes: 2

Related Questions