For NetBeans IDE users: Whenever you upgrade/downgrade your JAVA installation, more often than not you will encounter an error message when firing up NetBeans that essentially complains about not being able to locate the JAVA installation in the specified jdkhome variable:
(Note, selecting the Yes option will work 9 out of 10 times, unless of course you have completely uninstalled JAVA from your system).
It turns out that to fix this invalid jdkhome error is pretty easy. First, navigate to your NetBeans installation folder which by default should be “C:\Program Files\NetBeans 8.0” and look for the folder “etc”. Inside that folder should be a file with the name “netbeans.conf”. What you need to do is to open the file with your favorite text reader (notepad as an example) and look for the line that starts with netbeans_jdkhome=.
IMPORTANT: You might need administrative rights to save changes to this file. In that case, first open your text editor by right-clicking on the text editor icon and selecting the Run as Administrator option. (This is assuming that you are using Windows)
The next step is to alter the line to point to the currently installed JAVA JDK version. It should look something like this netbeans_jdkhome=”C:\Program Files\Java\jdk1.8.0_20″. If you are unsure as to which JDK version you currently have installed, navigate to your java’s installation folder (the default path is C:\Program Files\Java) and look for relevant JDK folder there.
Save the changes, and restart NetBeans.
Simple as that.