I recently upgraded my JDK and I started getting this message when I launched Netbeans.
Cannot locate java installation in specified jdkhome: [some outdated path]. Do you want to try to use default version?
I’m capable of ignoring messages like this for months, but when I tried to start a new Maven web application, it balked. It’s simple enough to fix, but it wasn’t obvious to me. So here you go.
Step One
In your Netbeans home directory (for example, C:\Program Files\NetBeans 7.0.1), open up the netbeans.conf in the etc directory (C:\Program Files\NetBeans 7.0.1\etc\netbeans.conf).
Step Two
Theres a property called netbeans_jdkhome. Change the value to match the JDK you want Netbeans to use (for example, C:\Program Files\Java\jdk1.6.0_25).
Step Three
Save your changes
Step Four
Restart Netbeans
Thanks for reading! If you would like to see what else I’m up to, check out Whiff
Thank you. It Works!
Very good man, thanks for post!!!
I’m facing the same Problem.
When I change the path. It shows access denied.
What do I do, I’m using an administrative user account.
Change file permission
Meneeb, perhaps the file is being used by something? Maybe shut down netbeans first? Dunno, haven’t tested this theory.
Thanks Dude..it works 🙂
Thanks a lot
Thank you so much! Is there also a way from inside the Netbeans IDE to set this?
Not at the time of this post. If it does now, please drop me a comment to let me know!
Sure it still does. Another issue is the link at Help – About going to http but the site is https only now, while domain redirection is not setup right, creating a loop.
Sure it still does. Another issue is the link at Help–About going to http://www.netbeans.org but the site is https only now, while domain redirection is not setup right, creating a loop.
Good Job …….. Thanks Works for me ……..
NetBeans 8.2 – Cannot locate java installation in specified jdkhome?
Answer: Edit the netbeans.conf file.
Close NetBeans, start Notepad or another text editor as Administrator. Right click on the Notepad application and choose “Run as administrator” and then open netbeans.conf with it. Change netbeans_jdkhome=”C:\Program Files\…whatever”.
Thank you~ it works well now.
You got me with the first sentence “I’m capable of ignoring messages like this for months” 😀
So… I just want to do it the right way after month now, thank you 😉
My NetBeans can’t open any project after this changes 😦
What’s the problem here?
I program on C :B
NetBeans doesnt work with jdk>8. Maybe you specified a higher version?
Thank you. it worked in one go.
thanks man!
Thank you so much! It worked! When nothing else seemed to work, your solution solved the problem.
Yay!
I followed the instructions but still got the error. However, when I clicked “Yes” to use the default version NetBeans started up fine. Using NetBeans IDE 9, JDK 11.0.1, Win10 Home.