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.
-
Possible duplicate: https://stackoverflow.com/questions/39956102/netbeans-ide-invalid-jdkhome-specified – Gernot Apr 03 '18 at 18:19
-
Attention Mac OS users: https://stackoverflow.com/a/52959955/2457251 – Almir Campos Oct 24 '18 at 01:47
1 Answers
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:
- Select Tools > NetBeans Platforms and verify that the Platform Folder is valid:
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.

- 16,436
- 7
- 61
- 102
-
Yes, I also tried to change the string that references "netbeans_jdkhome" to "C:\Java\jdk1.8.0_161" but access was denied. How am I supposed to change the string value? – Rongeegee Apr 03 '18 at 21:19
-
To be clear, you should not specify the string value I provided. That was merely an example, and is unlikely to be correct on your machine. You want the value to be wherever you installed JDK8, which **might** be something like **"c:\program files\java\jdk1.8.0_161"**, but check before setting it. I updated my answer for your "access denied" problem. – skomisa Apr 03 '18 at 23:01