7

Android SDK installation doesn't find JDK is not the same release as this, and the solution "back" then "next" doesn't work.

I have tried installing various versions of Java and nothing seems to be working. I've been trying to get this installed for the last 3 days. Solutions I have tried that do NOT work:

  • Pushing the back button then the next button.
  • Adding an Environment Variable for JAVA_HOME that points to the System32 path and the actual java install directory.
  • Installing various versions of Java. (Java 6 and Java 7)

The install file is called installer_r20.0.3-windows and is the current exe available at http://developer.android.com/sdk/index.html

Error Message java.exe

13
  • what happens when you fire javac at your command prompt ? Commented Aug 21, 2012 at 3:35
  • It gave an error. After that, I added C:\Program Files\Java\jdk1.6.0_34\bin to the "Path" env var and it now works in command prompt, but the installer still doesn't work. Commented Aug 21, 2012 at 3:39
  • can you print the path variable's value ? Commented Aug 21, 2012 at 3:39
  • I should mention that this is a brand new installation of Windows 7 on a brand new PC. (Installed 3 days ago) C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_34\bin Commented Aug 21, 2012 at 3:40
  • 1
    oh ok, change it to C:\Program Files\Java\jdk1.6.0_34 , you do not nee to add bin folder in the JAVA_HOME Path. Commented Aug 21, 2012 at 3:48

3 Answers 3

6

Ok, looking at to your JAVA_HOME path which is C:\Program Files\Java\jdk1.6.0_34\bin I suggest you to change it as C:\Program Files\Java\jdk1.6.0_34\. There is no need to add bin folder's path in the JAVA_HOME Path.

Sign up to request clarification or add additional context in comments.

2 Comments

Tried all variations of this, but it doesn't work. I have JDK 1.7.0_02.
do you have jre folder in that JDK folder ?
5

On my Win7 Ultimate 64 bits/ i need multiple things

  1. Set SystemEnvironment Variable JAVA_HOME = C:\Program Files\Java\jdk1.7.0_07
  2. Add the same value to SystemEnvironment Variable PATH, but make sure to put it before system32 path PATH = C:/Program Files/Java/jdk1.7.0_07;C:\Windows\system32; ....... (... = current value)
  3. and most important , i guessed. Rename c:\windows\system32\java.exe -> c:\windows\system32\java.exe.old
  4. Restart the installer (my case = installer_r20.0.3-windows.exe )

Voila!

This might help safe other's time

2 Comments

what's the point of renaming java.exe to java.exe.old? this method worked but I can't understand the reason behind renaming...
@saji159 I would guess that renaming it does two things: 1) It makes the java.exe not get called first when "java" is called and it preserves the backup / old java.exe.
2

Setting JAVA_HOME environment variable in System variable to C:\Program Files\Java\jdk1.7.0_07\ did solve my problem.

A couple of points to note.

  1. No need to specify bin or jre folder name.
  2. You will need to cancel and restart the Android SDK installation. Previous/Next may not work.
  3. I just copied the folder name from Windows explorer address bar. No need to replace the \ with /.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.