fix: Java SE Development Kit (JDK) was not found on this computer
I was just installing the fine IDE NetBeans 6.9 and its installer asked me to install the Java JDK first. It was saying "Java SE Development Kit (JDK) was not found on this computer" (see screenshot). The dialog points one to download the JDK at http://java.sun.com/javase/downloads. Since Oracle acquired Sun, now that redirects to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
The JDK seems to be included in Java SDK now together with GlassFish Enterprise Server, so their page takes you to that when you ask for the latest JDK (btw, the version numbers can confuse you since the SDK has a lower version number than the JDK that’s included in it).
After installing the SDK (JDK and GlassFish etc.), I created a batch file (install-netbeans.bat) to launch the NetBeans installer with the appropriate parameter (was too bored to try the alternative of setting the JAVA_HOME environment variable in Computer’s Advanced Properties at Windows):
netbeans-6.9-ml-windows.exe -javahome "c:/somefolderpath/glassfishv3/jdk/bin"
…but I kept on getting the same error dialog again and again. Then I did a web search for "netbeans installer javahome" and came across FaqInstallJavaHome NetBeans wiki entry where I noticed that whereas Netbeans 4.x/5.x used "-is:javahome", NetBeans 6.x uses "–javahome".
YES, WITH TWO DASHES IN FRONT of "javahome" installer argument! Totally foreign syntax to Windows world (but not to Unix commands and the Java runtime launcher syntax [at least in recent years]). Even worse is that it’s almost impossible to notice the double dash with the font face used in that error dialog.
All was finally fine using this one (just added the extra dash to write –javahome instead of -javahome):
netbeans-6.9-ml-windows.exe –javahome "c:/somefolderpath/glassfishv3/jdk/bin"