Home > Uncategorized > fix: Java SE Development Kit (JDK) was not found on this computer

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"

Categories: Uncategorized Tags:
  1. 2010/11/08 at 12:51

    To sum up:
    1) place NetBeans installer on the desktop
    2) create a runme.bat file (say using Notepad – make sure you write “test.bat” at save dialog, not “test.txt” or “test.bat.txt”) at the same folder
    3) put the above “netbeans-6.9-ml-…” command (the one in bold) on a single line in the batch (runme.bat) file. Do modify the last path appropriately to point to where you installed glassfish
    4) save the batch file (ANSI encoding)
    5) double-click the runme.bat on the desktop to launch it and proceed with the installation

  2. Dennis
    2011/01/17 at 04:48

    Hey there. I’m having the same problem installing the Android SDK. I’ve installed the Java JDK like it wanted, but I get the same “java SE development kit not found” error. I tired the batch as you have listed but it still pops up with the same error. I tired both -javahome and -is:javahome, with one and two hyphens.

    Have any suggestions on this? Thanks man, Dennis

    • 2011/01/17 at 12:37

      Android uses Google’s own Java VM (with incompatibilities and Android-specific customizations probably), that’s why they got a lawsuit from Oracle. Do you try to use Android with NetBeans? Can you provide more details?

  3. Dennis
    2011/01/18 at 01:09

    I’m just starting out with it. I need to use adb in command to push some files to my phone, but need to have the Android SDK installed to use it. All it seems to need is the Java SE development Kit. I just tried installing it directly to C: rather then Program Files, but the Android SDK installer still isn’t seeing it.

    • 2011/01/20 at 22:31

      can define JAVA_HOME environment variable on windows or pass the java home as commandline parameter to the installer if it accepts such

  4. Dennis
    2011/01/18 at 01:30

    I think I got it worked out by downloading a previous version of the Android SDK. It gave me the files to unzip and manually place in the directory. adb commands are working now. Thanks man.

  5. alejojau
    2011/02/08 at 03:05

    I was trying the same above but didnt work, i was installing netbeans 6.5.1; the thing its after you check the “javac” command and shows information, you must change the compatibility of the installing file, with the windows service pack 3 and then run the file.

  6. 2011/02/08 at 12:16

    Do you mean on Windows 7 to set that you want to run javac using compatibility mode, as Windows XP SP3?

    On Vista I didn’t need to do so, I wonder why Windows 7 would need such setting. But I usually have UAC (User Access Control) turned off, so that might be your use. In that case you could try to check “Run as administrator” at the Compatibility tab instead of selecting Windows XP SP3 there.

  7. 2011/02/08 at 12:20

    btw, speaking of UAC, your could also try setting the installer itself to run as administrator the same way, but the issue is that sometimes installers unpack other executables and somehow manage to run them in non-admin mode (probably they don’t launch them as child processes as they should have).

    The proposed solution by Microsoft is to use an elevated command prompt in that case, that is go to Start/Search and type cmd and then right click the item “CMD Shell” (command line prompt window) that is displayed in the Start menu and select “Run as administrator”.

    Then into the elevated command prompt window you can drag-drop the executable file of the installer and when it shows the command there press ENTER to launch it. All executables the installer unpacks and runs will then also run as administrator (it seems then they all run as child processes of the elevated command prompt).

  8. Merong
    2011/04/04 at 15:50

    Merong :

    Dennis :
    Hey there. I’m having the same problem installing the Android SDK. I’ve installed the Java JDK like it wanted, but I get the same “java SE development kit not found” error. I tired the batch as you have listed but it still pops up with the same error. I tired both -javahome and -is:javahome, with one and two hyphens.
    Have any suggestions on this? Thanks man, Dennis

    i also have same problem installing Android SDK….why?

    try this out….run the Android SDK installer(installer_r10-windows)..then do not click “next” first…
    follow this step:
    -find “javac.exe” normally in C:Program Files/Java/jdk1.6.0_24/bin/javac
    -then click on “javac.exe”
    -back to SDK installer> click next..
    that all..

  9. 2011/04/04 at 16:54

    Hi Merong, read about this trick with Android SDK at other posts too, not sure if single click on javac.exe is needed there or double-click and then answer yes to any UAC security questions

  10. Yuval
    2011/07/04 at 20:57

    Double click on Javac.exe solved the problem for me !

    Thanks for the tip !

  11. DK
    2011/09/15 at 04:19

    I installed Java NetBeans 6.5.1 properly in my laptop and it worked. But after using it, I tried to uninstall it. Before uninstalling NetBeans, I uninstalled some other files of Java and now when I try to uninstall NetBeans I receive an error “Java SE Development Kit (JDK) was not found on this computer” and when I try to install NetBeans I receive an error “NetBeans IDE 6.5.1 and JDK 6 update 13 are already installed.” Now please tell me how to fix it.

  12. 2013/11/29 at 20:25

    I’m having the same problem with the program pssav

  13. 2013/11/29 at 20:25

    I’m having the same problem with the program pssav windows 8

  14. KW
    2014/06/11 at 16:09

    I uninstalled JDK from my PC using Microsoft Fix as I ran into error 1723. I copied the dll file from a different computer but java won’t uninstall. So, I used Microsoft Fix. But now NetBeans won’t uninstall and instead shows a message same like the picture you posted above. On installing NetBeans I find this error which says “NetBeans IDE 6.5.1 and JDK 6 Update 13 already installed”. Please Help.

  15. 2014/09/22 at 19:50

    if you install newer java from http://java.com it then tests if it works ok in the browser and offers to remove previous versions

    for NetBeans to not appear installed, you can try removing the “.netbeans” folder from the user profile folder (C:\users\…) and also remove the netbeans folder from the c:\program files\…, plus maybe to use regedit.exe and search for “NetBeans” in the registry, then throw away all keys (from the tree) that have such values under them (however you have to be careful what you remove).

    Alternative is to use ProcessMonitor from http://www.Sysinternals.com (now part of Microsoft) to monitor what the installer checks in the registry or the filesystem before it says that NetBeans is installed

  16. Debaranjan Ghosh
    2016/05/21 at 03:03

    Thanks a lot for the solution.I was trying for a long time to fix the installer problem your solution fixed it . Just modified the JDK path ( Including the JRE) and netbeans 6.8 was installed successfuly. I am new to Java J2EE ( I know core Java) and installed it to enhance my knowledge for Java J2EE

  17. 2018/04/08 at 16:30

    hello there, i am new to the programming environment and today, i downloaded netbeans 8.2 on windows 10. installing it, it gives the same dialog box as above, i then downloaded java jdk 10 for windows x64, installed it well and restarted my laptop but netbeans still gives the same response. help coz i can wait to start.

    • 2018/04/08 at 20:26

      Hi, please see the instructions in the article, you need –javahome command-line parameter when launching the installer to point to the jdk

      • 2018/04/08 at 22:59

        @george, i get that put am a rockie in this and i can hardly figure what this entirely call for. Screenshots on this would do if possible.

      • 2018/04/09 at 18:58

        After installing the JavaEE SDK, you can find the JDK in a folder like say “c:/somefolderpath/glassfishv3/jdk/bin” (depending on where you told it to install).
        So you can then press the magnifying glass (Search) button at the Windows taskbar (the button next to the Windows button at the bottom-left of the screen) and type CMD and press enter. This will open the command-line window
        In that (usually black) window you can drag-drop the netbeans installer executable (say netbeans-6.9-ml-windows.exe or later one that should exist now) and it will type-in automatically the full path to that executable file.
        You can append a space char and -javahome “c:/somefolderpath/glassfishv3/jdk/bin” to that (with the double-quotes and with a double dash before the javahome parameter). Edit the somefolderpath etc. there to point to the JDK folder inside the Glassfish JavaEE server installation. Then press ENTER and it will run the NetBeans installer and find the JDK from there without having to set the JAVA_HOME evnironment variable to point to that JDK folder

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: