I recently came across this message when opening NetBeans after updating my Java version from 1.7.0_05 to 1.7.0_07.
Cannot locate Java installation in specified jdkhome: C:\Program Files\Java\jdk1.7.0_05 Do you want to try to use default version?
There are no ill effects from clicking Yes, and everything works as normal within NetBeans, but it’s annoying having to click Yes each time you open NetBeans right?
I tried every menu I could find within NetBeans, but was unable to make the message go away. Thankfully, you can fix this message by editing a config file in the NetBeans installation directory located at /etc/netbeans.conf. For me this was:
C:\Program Files\NetBeans 7.2\etc\netbeans.conf
The line you are looking for is:
Which was on line 57 for me.
Simply change this to your current Java version and you should no longer see that annoying message!
Update August 2015:
In the comments, Andrew has recommended that it’s possible to comment the above line out (put a # at the start) and the launcher will automatically detect and use a JDK, which will work for NetBeans 8 with Java 8 and beyond.
This post is part of our “NetBeans article Index” series. In these articles, we aim to explore NetBeans in different ways, from useful hint and tips, to our how-to’s, experiences and usage of the NetBeans IDE.
Latest posts by Leon Atherton (see all)
- Making a Simple Basecamp Chatbot with NodeJS - November 29, 2017
- My Business of Software Conference Experience – BoS Europe 2017 - June 7, 2017
- Do you still need IE8 support in JPDF2HTML5? - February 8, 2017
- JPDF2HTML5 2016 Roundup and looking ahead to 2017 - December 20, 2016
- What Chrome 45 dropping NPAPI Plug-in support means - September 10, 2015