4

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.

1
  • Which version of JDK you are using?
    – avirk
    May 28, 2012 at 16:35

7 Answers 7

5

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/

3

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.

2
  • This answer makes no sense. All you did was install the current version of the Java SDK.
    – Ramhound
    Jul 30, 2012 at 11:49
  • 1
    @Ramhound, makes. he states that he installed x86 version even on 64b windows.
    – nothrow
    Sep 21, 2012 at 16:10
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.

1

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

0

I had an app last week that wouldn't work with Java 7. I had to manually download the latest Java 6 from java.com, uninstal 7, then install 6, then disable Java auto-updates in the Java app in the Control Panel.

2
  • 3
    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. May 30, 2012 at 11:29
  • @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. Oct 13, 2012 at 3:25
0

Try running the android sdk installer in the administrator mode. IT worked for me. Just right click the installer and select 'run as administrator' option. Should work out

0

This drove me nuts for a couple of days. I was not able to resolve the issue through the Android studio installer, but found a workaround:

  • Go to http://developer.android.com/sdk/index.html
  • Instead of downloading "Android Studio package" (the exe file), scroll down and select "SDK tools package" (the zip file).
  • This work perfectly and allows you to select all the packages you want to download, including the packages installed by the installer.
1
  • Probably not needed as an answer since there are many other good answers and the question is over 4 years old.
    – Eric F
    Jun 20, 2016 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .