Java NetBeans

Invalid jdkhome specified – Cannot locate java installation in specified jdkhome:

You click the NetBeans IDE shortcut and got a message like below:

This is due NetBeans cannot locate java installation in specified jdkhome: C:Program FilesJavajdk1.6.0_22
Most probably you initially installed JDK at the default location above and then you uninstall it and reinstall to another location.

Anyway, to fix this, all you need to do is just go to find netbeans.conf from where you installed your NetBeans. For me, I have it at C:Program FilesNetBeans 6.9.1etc

Once found, open the file and look for something like below:

netbeans_jdkhome=”C:Program FilesJavajdk1.6.0_22″

Then, change the above to the valid path, example


That’s it!

16 replies on “Invalid jdkhome specified – Cannot locate java installation in specified jdkhome:”

Hi Steve. Thanks for this but I can’t seem to edit netbeans.conf It says access denied. I am using my own computer in admin mode of course.

Hi Pranav,

I encountered the same problem. Even though you are using your computer in admin mode you must open Notepad as an administrator. Simply right click on notepad and then click on “Run as Administrator”. This worked for me.

Thanks a lot it worked. Guys remember to run notepad as Admin so as to edit the file. Now let me try to fix eclipse. my problem started when i deleted the path variable!!!!

Leave a Reply

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


Exit mobile version