Unable to install Android for Windows 7 because JDK is not found

18,076

Solution 1

You might have a different problem, but here is the solution I found to the same error message:

  1. Go to C:\Windows\system32
  2. Rename java.exe to something else, for example java2.exe
  3. Run Android SDK Setup again

Thanks to: http://www.androidbeats.in/android-sdk-failed-to-find-java-exe/4251/

Solution 2

I downloaded Eclipse Juno and I wanted to install Android SDK too. It only worked by installing the Java JDK 'Windows x86 79.48 MB jdk-7-windows-i586.exe' from oracle.com (despite the fact that I use Windows 64-bit).

Remember to uninstall every Java JDK kit from control panel first before you install the JDK above.

Solution 3

As the OP commented on this answer:

I installed Java JDK 7u4 for windows 7 64-bit. I think the Android SDK installer was trying to detect the 32-bit version of the JDK, so I went to install the 32-bit version of the JDK.

Then I ran the Android SDK installer again. This time the installer detected the JDK and it installs the SDK. That was my solution.

Solution 4

Browse To C:/Windows/system32 and find a file named "java.exe". Then, just rename it to "java2.exe". Voila ! It will work.

Share:
18,076

Related videos on Youtube

user1294663
Author by

user1294663

Updated on September 18, 2022

Comments

  • user1294663
    user1294663 over 1 year

    I have JDK SE7u4 installed in windows 7. I tried to install Android on Windows 7 using the installer_r18-windows.exe but no avail.

    The setup window showed the message saying that the Java SE JDK not found and

    ERROR: Failed to find Java version for C:\Windows\System32\java.exe
    The system cannot found the file specified.

    If you believe you have a JDK installed and it was not properly recognized, simply set an environment variable JAVA_HOME to point to it

    I right clicked on Computer > Properties > Advanced System Settings > Environment variables. I created a NEW system variable called JAVA_HOME and set the value as C:\Program Files\Java\jdk1.7.0_04\bin or C:\Windows\System32\java.exe.

    I ran the installer again — the same error message still appeared.

    • avirk
      avirk almost 12 years
      Which version of JDK you are using?
  • user1294663
    user1294663 almost 12 years
    I installed Java JDK 7u4 for windows 7 64-bit. I think the Android SDK installer was trying to detect the 32-bit version of the JDK so i went to install the 32-bit version of the jdk. Then I ran the Andoid SDK installer again. This time the installer detected the JDK and it installs the SDK. That was my solution.
  • Ramhound
    Ramhound almost 12 years
    This answer makes no sense. All you did was install the current version of the Java SDK.
  • nothrow
    nothrow over 11 years
    @Ramhound, makes. he states that he installed x86 version even on 64b windows.
  • Michael Hampton
    Michael Hampton over 11 years
    @user1294663 Please post your solution as an answer and then accept it, so that others know your issue is resolved (and how you resolved it!). Comments such as this one are easy to miss.
  • Eric F
    Eric F almost 8 years
    Probably not needed as an answer since there are many other good answers and the question is over 4 years old.