Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans IDE - invalid jdkhome specified

Netbeans 8.0.2 shows this error on startup Netbeans 8.0.2 error on startup. I searched for this error, but nothing works for me.

I modified the netbeans_jdkhome in netbeans.conf file, but nothing. Then uncommented it, nothing. The error keeps showing up. It´s like there is another netbeans.conf file, but I don´t know where. I´m running Windows 10 and have JDK 1.8 installed in "C:\Program Files\Java\jdk1.8.0_101" .

like image 713
Jiří Mačák Avatar asked Oct 10 '16 10:10

Jiří Mačák


3 Answers

go to C:\Program Files\NetBeans 8.0.2\etc, open the file netbeans.conf then change netbeans_jdkhome to the path of your JDK, netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_101"

if you are not sure about the version of jdk, you can find it by typing in CMD java -version

like image 154
CY15 Avatar answered Sep 17 '22 17:09

CY15


You may have a problem getting your edit to stick because you need Administrator Privilege to edit the netbeans.conf file.

Windows 10:

  1. left mouse-click on the windows button on the task bar
  2. type cmd.exe
  3. windows search should list "Command Prompt - Desktop App"
  4. right mouse-click on "Command Prompt - Desktop App"
  5. select "run as administrator"
  6. select the Yes button from User Account Control dialog box
  7. from the command prompt change directory to where the netbeans.conf file is.
  8. CD "C:\Program Files\NetBeans 8.0.2\etc"
  9. type: notepad netbeans.conf
  10. search for netbeans_jdkhome=
  11. add the path to your jdk: netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_181"
  12. save netbeans.conf
  13. start Netbeans
like image 22
Congdar Avatar answered Sep 17 '22 17:09

Congdar


I found a decent solution for Windows users.

Go to your NetBeans install folder (for instance: C:\Program Files\NetBeans 8.0.2\etc), open the file netbeans.conf then just comment out the line:

netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_101"

to

#netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_101"

The '#' is for comment. You will see this in the file.

Then just run the NetBeans IDE as usual.

like image 32
Nixon Nelson Avatar answered Sep 18 '22 17:09

Nixon Nelson