The JDK is missing and is required to run some NetBeans modules
Find the file [netbeans installation directory]/etc/netbeans.conf
Luckily, Linux has a find
helper like
find /home/ -name "netbeans.conf
,
in which you can change the /home/
to a location where you want to search.
I found it at /usr/local/netbeans-8.1/etc/netbeans.conf
Once, you found the file, the following property needs to be set:
netbeans_jdkhome="[jdk_path]"
where you can find the jdk_path using:
update-alternatives --config java
In my case, I found it at /opt/java/jdk1.8.0_191
[Solved] For Mac OSX 10.11 (El Capitan). Solution may be similar for other Unix-based systems.
The problem may have occurred because I inadvertently installed the jre prior to installing the jdk. I uninstalled the jre, installed the jdk and reinstalled NetBeans but the problem (popup window) remained. However, the fix was fairly simple.
1. Make sure NetBeans is not running. 2. Make sure the jdk is installed. 3. Determine the location of the jdk: The jdk location can be determined by entering the following (in Terminal): $ /usr/libexec/java_home For my system, the output was: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home 4. Edit the NetBeans configuration file to indicate the location of the jdk. Near the bottom of this Netbeans configuration file (or equivalent for your NetBeans version): /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf Comment out the following line (insert a # before the first character): #netbeans_jdkhome="/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/bin/jre" Then, add the following line (or equivalent for your jdk version): netbeans_jkdhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home" Then, save and exit the editor. 5. Start NetBeans (no more popup window indicating that the jdk is missing).
When netbeans has problems trying to find the path of the jdk, it's mainly because the version of the jdk does not match. Open the file C:\Program Files\NetBeans 8.2\etc\netbeans.conf, and verify that netbeans_jdkhome = "C:\Program Files\Java\jdk1.8.0_111".