I'm trying to install the Android SDK on my Windows 7 x64 System.
jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation.
Is this a known issue? And is there a solution?
Press Back when you get the notification and then Next. This time it will find the JDK.
Actual SETUP:
OS: Windows 8.1
JDK file: jdk-8u11-windows-x64.exe
ADT file: installer_r23.0.2-windows.exe
Install the x64 JDK, and try the back-next option first, and then try setting JAVA_HOME like the error message says, but if that doesn't work for you either, then try this:
Do as it says, set JAVA_HOME in your environment variables, but in the path use forward slashes instead of backslashes.
Seriously.
For me it failed when JAVA_HOME was C:\Program Files\Java\jdk1.6.0_31 but worked fine when it was C:/Program Files/Java/jdk1.6.0_31 - drove me nuts!
If this is not enough, also add to the beginning of the Environment Variable Path %JAVA_HOME%;
Updated values in System Environment Variables:
JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
JRE_HOME=C:/Program Files/Java/jre8
Path=%JAVA_HOME%;C:...
I found the solution and it's beautifully stupid. I found Android SDK cannot detect JDK.
Press the Back button on the SDK error screen that tells you that the EXE couldn't detect the JDK. Then press Next.
Who would have thought that would happen?
It seems like it doesn't work without 32 bit JDK.
Just install it and be happy...
I downloaded the .zip archive instead and ran SDK Manager.exe, and it worked like a charm. You had the same issue with the .exe otherwise.
Warning: As a commenter mentioned, don't try this on a Windows 7! I tested it with Windows XP 64 bit.
As the posted solution does NOT work for all (including me, myself, and I), I want to leave a note for those seeking for another way (without registry hacking, etc.) to solve this on a Windows 64 bit system. Just add PATH (capital letters!!) to your environment Variables and set the value to your JDK-Path.
I added JDK to the existing "Path" which did not work, like it didn't with JAVA_HOME or the "Back"-Solution. Adding it to "PATH" finally did the trick.
I hope this might be helpful for somebody.
All you need are the following two registry entries. It appears as if whoever posted the other registry stuff basically just copied all the keys from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft into HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft,
which obviously isn't an ideal solution because most of the keys aren't needed.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit\1.6]
"JavaHome"="C:\\Program Files\\Java\\jdk1.6.0_23"
Non of these solutions worked for me. I fixed it by temporarily changing the filename of C:\Windows\System32\java.exe to java_.exe
None of the solutions here worked for the 64-bit version.
Putting the JDK path before the c:\windows\system32\ path in your environment variables solves the problem. Otherwise the 32-bit java.exe is found before the 64-bit JDK version.
After reading a couple of blog posts, it does seem to be even an easier fix by clicking BACK when the installer says couldn't find the JDK, and then simply click NEXT again and magically it finds the JDK. No registry messing around or re-downloading etc..
Adding JAVA_HOME environment variable (under System Variables) did the trick for me.
Clicking "Back" and "Next" buttons didn't work.
Windows 7 Professional x64, JDK 1.7.0_04 (64 bit, I don't have x86 version installed)
I think that installer tries to find JDK in specific (1.6?) version and if it can't find it, checks JAVA_HOME which was not set in my case. I have another computer (the same system but with JDK 1.6 x64) and it worked without JAVA_HOME variable.
You don't have to install 32 bit version of JDK :)
I copied the Java.exe from
C:\Windows\System32
to
C:\Windows\SysWOW64
and it worked.
I'm using 64 bit Windows 8.
Setting the JAVA_HOME environment variable to
C:\Program Files\Java\jdk1.7.0_07
instead of
C:\Program Files\Java\jdk1.7.0_07\bin
fixed it for me.
The guy above who put this: "I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path." This was in fact the correct answer.
For this SDK to install this is what I did. I am running the latest Microsoft OS Windows 8.
User Variables:
Path C:\Program Files\Java\jdk1.7.0_07\bin
Environment Variables
Create these two:
CLASSPATH %HOME_JAVA%\jre\lib
HOME_JAVA C:\Program Files\Java\jdk1.7.0_09
This one already exists so just edit:
Path At this end of WindowsPowerShell\v1.0\ simply add ";C:\Program
Files\Java\jdk1.7.0_09"
This is what I did and it worked for me. =)
This registry fix worked like a charm on my Windows 7 x64 setup: http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/
Press Report error and OK. Next will be enabled.
Try downloading and installing the zipped version rather than the .exe installer.
Also, RUN AS ADMINISTRATOR! Worked for me with backslash fix.
I had the same problem, tried all the solutions but nothing worked. The problem is with Windows 7 installed is 64 bit and all the software that you are installing should be 32 bit. Android SDK itself is 32 bit and it identifies only 32 bit JDK. So install following software.
JDK (32 bit)
Android SDK (while installing SDK, make sure install it in directory other than "C:\Program Files (x86)", more probably in other drive or in the directory where Eclipse is extracted)
Eclipse (32 bit) and finally ADT.
I tried it and all works fine.
I had the same problem and solved it by installing the x86 version of the JDK (on Windows XP x64).
I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path.
Android SDK is 32 bit app, and it requires the 32 bit of JDK to work... the 64 bit JDK won't make any use for it...
1-Simply done the "JAVA_HOME" environment variable thing.
2-Right-Click on Android SDK and from compatibletiy Tab Select windows 7 and administrator.
3-Run it again.
WORKING SOLUTION AND NO REGISTRY MODIFY NEEDED
Simply put your java bin path in front of your PATH environment.
PATH before
C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)
PATH after
C:\Program Files\Java\jdk1.6.0_18\bin;C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)
And now the Android SDK installer is working.
BTW, I'm running Win7 x64.
For installer_r21.1-windows.exe on Windows 8 x 64 what worked for me was setting up my user environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_10.
Hope this helps you all! :)
Yeah install the 32 bit version of the Java SE SDK (or any of the combinations). That should help solve your problem.
I'm running a 64-bit version of Windows 7 and I was getting this issue when attempting to install Android Studio 1.0 using the executable from:
http://developer.android.com/tools/studio/index.html
I tried all the listed solutions and several different versions of JDK 1.7 and 1.8 -- no dice. I went with installing the zipped version of the application and it worked like a charm:
http://tools.android.com/download/studio/canary/latest
Still baffled by this problem; especially since beta versions of Android Studio worked just fine.
The above methods did not work for me in Windows 8 Pro.
Just set the path to
C:\Program Files\Java\jdk1.7.0_07\
Where C is your drive in which you have installed the JDK.
Don't forget the backward slash at the end.
You will have to download the 32-bit SDK version because Win7 64-bit is not supported only Windows Server 2003 has a supported 64-bit version. During the download of Java SDK pick "Windows" as your platform and not "Windowsx64".
Once I did this android SDK installed like a charm. Hope this helps.
I tried several posted solutions and then it took a system reboot before it started working, which may have been because I had just installed the JDK. Here are all the things I had going on - not sure which ones were essential:
64-bit JDK installed.
JAVA_HOME defined using forward slashes (/) instead of backslashes
().
JDK 'bin' directory listed at beginning of PATH.
System reboot.
Related
I installed java 64bit 1.7 and exe4j 64bit version. I tried to generate an exe from exe4j, but while running the program I'm having this error.
This is how I set up path variable. And this is right jre path. What did I miss here? please let me know.
Thank you.
This has to be done during your exe4j configuration.
In the fourth step of Exe4j wizard which is Executable Info select> Advanced options select 32-bit or 64-bit. This worked well for me.
or else install both JDK tool-kits x64 and x32 in your machine.
Try installing the 32 bit version of Java 6. This works for version Install4J 4.0.5. Should fire right up, or allow you to re-run the installer.
Any newer version or the 64-bit version of 6 will fail, complaining that the java.exe is damaged.
There are few steps to overcome this problem:
Uninstall Java related softwares
Uninstall NodeJS if installed
Download java 8 update161
Install it
The problem solved: The problem raised to me at the uninstallation on openfire server.
In my case (OWASP Zap scanner) I had to install the latest OpenJDK from https://adoptium.net
BH's answer of installing Java 6u45 was very close... still got the popup on reboot...BUT after uninstalling Java 6u45, rebooted, no warning! Thank you BH!
Then installed the latest version, 8u151-i586, rebooted no warning.
I added lines in PATH as above, didn't do anything.
My system: Windows 7, 64 bit. Warning was for No JVM, 32 bit Java not found.
Yes, I could have installed the 64 bit version, but 32bit is more compatible with all programs.
It might be issue with the Java JDK/JRE package itself, try downloading & installing/configuring latest version of JDK, followed by system restart. It worked for me and it may work for you too.
I had a similar problem. With the difference that I wanted to use the 32-bit version. The only way I could solve the problem was to install the 32-bit version of Windows XP on a virtual machine!!
Leave you stuff there and Try the following as well:
Start > Right-click on My computer > Properties > Advanced system settings > Environment Variables > look for variable name called "Path" in the lower box
set path value value as: (you can just add it to the starting of line, don't forgot semi column in between )
c:\Program Files\java\jre7\bin
It worked for me, but the exe4j can leave a signature when you double click the .exe application
at the beginning it says that failed to find java jdk or jre so i installed it. then i run it again it came up this.
It says that "Failed to find a Main Class in ... eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar"
java file are under
C:\Program Files (x86)\Java\jre1.8.0_31 && jre7
C:\Program Files\Java\jdk1.8.0_31 && jre1.8.0_31
my eclipse file are under
D:\迅雷下载\操作系统\eclipse
can someone tell me how to fix this ??
I was facing the similar issue where on launching eclipse photon it was giving error like:
Failed to find a Main Class in ...
eclipse\\plugins/org.eclipse.equinox.launcher*.jar
One of the reasons in my case was that I had two JDK versions on my system (JDK 6 & JDK 8).
It was running fine but stopped when I updated JAVA_HOME as JDK 6.
To rectify it, I added the below lines in the eclipse.ini file before -vmargs:
-vm
C:/Program Files/Java/jdk1.8.0_111/bin/javaw.exe
-vmargs
Basically, I passed the JDK 8 path to the eclipse as required version for eclipse photon was Java 8. And this got me working.
Try to move eclipse to some simpler path, like D:\development\eclipse
This error is due to because you might have downgraded the version of java in your environmental variables.Try changing the java version in environmental variables and then run the sts or eclipse..for better practice restart the system.hope it helps.!!
I do not mean to steal the first answer - it did help me solve my very similar issue.
I am running Windows 8 x64 bit and installed a modded version of Eclipse in a custom path (rather the default install location that was suggested) - and I got that error.
So, I deleted that Eclipse install. Then installed both x86 and x64 versions of JDK (to their default install locations), and repeated the Eclipse install to the default install location - that solved the problem for me!!!
The reason I installed both JDK versions was because I initially installed only the x64 bit version and a different error came. So I removed that Eclipse again, and repeated the JDK with both versions, etc...
I was on this problem for like an hour and a half not getting that if you save the eclipse file in a non-English named folder it doesn't open.
Hope it helps :)
Check if there are 2 Java paths mentioned in the system Variable "Path"
If yes, Move up the Java path which is mentioned in JAVA_HOME.
For example:
If JAVA_HOME=C:\Program Files\Java\jdk1.8.0_211
then the Path should have same Java version's path
Path=C:\Program Files\Java\jdk1.8.0_211
In my case I just changed the Path from
Path=C:\Program Files\Java\jdk1.6.0_45\bin
To
Path=C:\Program Files\Java\jdk1.8.0_211
Remove Eclipse from Non English folder if any.
This is issue might be because of the folder location or the JDK version,
I installed the latest version JDK and with eclipse-inst-win64 provided by eclipse i was able to install and run successfully
Same thing happens when you change eclipse.exe to a different name, seems like org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar starts the ide and looks for eclipse.exe
In my case, the Eclipse installer downloaded the wrong VM vertion. I download it separately. Choose it in clause "Java 11+ VM" and it works. Also check you do not have Russian letters in eclipse.ini. If you do, then change the encoding to UTF-8 and write the right letters in Russian.
I installed Android Studio but it was giving me error that I need to install JDK but JDK was already installed. Then I realized it is asking to install 64bit version of JDK.
Anyway I just downloaded latest JDK 64bit version and set the following in Environment Variable but still Android Studio is giving error:
Error
'tools.jar' seems to be not in Android Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.
Following paths are set in my Windows 8.
Path in User Variables
E:\Program Files\Java\jdk1.8.0_25\bin
JAVA_HOME in System Variables
E:\Program Files\Java\jdk1.8.0_25
Path in System Variables
E:\Program Files\Java\jdk1.8.0_25\bin
32bit JDK is installed on C drive while 64bit JDK is installed on E drive (as shown above). 32 bit JDK is not being used in any User or System Variables.
I have also restarted the PC.
How do I fix this issue?
I had this same problem and was able to fix it after wasting about 3 hours:
Just copy tools.jar from %JAVA_HOME%\lib to (Android Studio Root)\lib
check your JAVA_HOME value!
it should be like this
E:\Program Files\Java\jdk1.8.0_25\jre
First locate in your PC the route of your JDK (for instance: C:\Program Files\Java\jdk1.7.0_45)
then change the JAVA_HOME variable as follows:
Right-click the My Computer icon on your desktop and select Properties
Click the Advanced tab
Click the Environment Variables button
Under System Variables, click New
Enter the variable name as JAVA_HOME
Enter the variable value as the installation path for the Java Development Kit
I installed jdk 1.8.0_51 64bit on Windows7.
After that, no JAVA_HOME was defined, so I had to define it myself as described above, but it did not work unless I added a trailing backslash:
D:\Programs\Java\jdk1.8.0_51\.
Without the backslash at the end it did not work.
Known issue - my solution was to install JDK 7u80 - worked after that.
https://code.google.com/p/android/issues/detail?id=187048
Just Copy the tools.jar from your jdk to Android lib directory.
In my case I've installed newest Java version without uninstalling older version first. After I've uninstalled the older Java version this error was gone.
Also make sure your JAVA_HOME system variable is set properly, e.g.:
Variable Name: JAVA_HOME
Variable Value: C:\Program Files\Java\jdk1.8.0_31\
And finally, that you've installed proper version for your OS, x86 or x64.
I had exactly the same problem.
In my case I finally installed JRE to "C:\Program Files..." and the JDK to my default destination , which is "E:\Program Files..."
It seems that the JDK and JRE cannot point to the same place for Android Studio .
I had the same issue on windows 7 when I installed Android Studio. I had Jdk 8 on my system. So for me, copying the tools.jar from jdk\lib to androidstudio\lib worked. I found the tools.jar was missing from androidstudio's lib directory. I had set JAVA_HOME in user variable and JDK in system variable.
I had the same error -- tools.jar seems to be not in Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE.
I have a few Java JDKs downloaded. JAVA_HOME was pointing to C:\java\jdk1.7.0_45. When I switched to C:\java\jdk1.7.0_75, it worked. It makes no sense - both have lib/tools.jar. I did a jar tvf on each of the tools.jar files and they were fine. I ran java -version on each java & it ran ok. Dunno - makes no sense.
Platform: Windows 7 Professional - 64-bit v1.10.00.AG B11 Service Pack 1
Installing it to the default installation path instead of a custom one did solve the issue for me.
Source: https://code.google.com/p/android/issues/detail?id=187048#c9
First locate in your PC the route of your JDK (for instance: First locate in your PC the route of your JDK (for instance: C:\Program Files\Java\jdk1.8.0_11)
then change the JAVA_HOME variable as follows:
Right-click the My Computer icon on your desktop and select Properties
Click the Advanced tab
Click the Environment Variables button
Under System Variables, click New or edit it if there already a path for it ( you should make sure that the path is jdk)
Enter the variable name as JAVA_HOME
Enter the variable value as the installation path for the Java Development Kit)
1) Just install JDK from here
2) Change JAVA_HOME variable (e.g. C:\Program Files\Java\jdk1.8.0_112)
I add a similar problem on Linux.
In my case my JAVA_HOME env was pointing to the JRE HOME instead of the JDK HOME.
On my linux system I had done:
sabayon ~ # eselect java-vm list
Available Java Virtual Machines:
[1] icedtea-bin-8
[2] oracle-jdk-bin-1.8
[3] oracle-jre-bin-1.8 system-vm
sabayon ~ # eselect java-vm set system 2
And then Android Studio started like a charm. Download and install the SDK.
After I set JAVA_HOME variable and restart my windows pc I resolved my issue.
JAVA_HOME value should like below.
C:\Program Files\Java\jdk1.8.0_25\bin
I paste a screenshot for someone's help.
You can go here From My Computer / This PC > Property > Advance Variable.
I recently came across this issue while using a Managed Software solution. The company I was working with had Android Studio has part of their managed applications, however, it was a much older version that the latest release. When you use an older version of Android Studio coupled with a newer JDK (I tried 11 and 15) you then receive the error indicating tools.jar cannot be found in CLASSPATH. I resolved this by downloading the latest version from Android Studio's website and it worked like a charm!
I tried everything I could but it didn't help. So I reinstalled Windows and installed Android Studio and now everything works.
And the irony is, there is no JAVA_HOME or JDK_HOME variable defined but it still works.
I'm using eclipse on what I thought were all 64 bit runtime environments. The current settings Java>installed JREs and Execution Environment all point to jdk1.6.0_30 which is a 64 bit version of the JDK. However, eclipse still thinks it's running a 32 bit version because when I run:
System.getProperty("sun.arch.data.model");
it returns 32 instead of 64.
And the external JNI resource that I compiled for 64 bit machines will not link to the shared .so file unless it's running in a 64 bit enviroment. (I'm getting word size mismatch errors when I try to do this)
So How can I reconfigure eclipse to run 64 bit jvm. Does eclipse itself have to be a 64 bit version?
:on linux
Edit: I have tried everyone's suggestions and nothing is working. I've changed the execution, and enviroment variables to point to the newst JDK I have which is 1.6_30. when I run the program from a command line I get 64 and amd64 as the value when I run the same program in eclise I get 32 and i386. Something is wrong in eclipse that is causing it to try and run it on a 32 bit JVM. when I try java -d32 -version it says that a 32 bit enviroment isn't installed but Eclipse doesn't know that. I've modified the Eclipse.ini file and still nothing is working. I've restarted eclipse after these changes...nothing. Can some one who knows eclipse well people help me out here. thanks
Add the -vm tag to eclipse.ini or the shortcut to explicitly specify a JRE. Note that the default for Windows XP is to use the CRAPPY JRE that comes with Windows.
-vm "%JAVA_HOME%/bin/javaw.exe"
In eclipse.ini add:
-Xmx8g
-d64
For me its working properly! . Make sure your path is c:\Program File not c:\Program File(X86) ( if you installed 64 bit JDK it should store in c:\ Program Files)
Eclipse configuration is explained here
The "installed JREs" (better use JDKs) are used for building and running your code and can be of different architecture or Java version. The JVM used for running Eclipse is defined in the eclipse.ini file. You should use the version for the architecture of the JVM.
Okay. This has been rather headache inducing, but I believe I have a solution. After changing the eclipse.ini, Go to your project properties. Under the Run/Debug settings, edit the launch configuration for your project. Under the JRE tag, click installed JREs. When that dialog comes up, click search. Go to your program files folder, NOT the x86 one, and let it search for your JREs. When the latest comes up, deselect the JRE that was currently selected and select the most recent JRE that it found. I renamed mine JRE7-64 just so I could identify a difference. This solved the issue on my end. Good luck
I think there is a bug in the Run Configuration page.
I had to add the 64-bit JRE in run configuration, select it, and DELETE the 32-bit entry (even though it was already deselected).
eclipse.ini didn't work for me.
This is Eclipse Luna.
I know this have been asked many of times before but i've read through all of the answers for this problem yet i haven't been able to solve this issue.
My installer finds the JDK (never had the problem of it not finding it) but after the install process when it want's to download libraries a cmd looking window pops up in the background and a window telling me to add a certain path to the "Path" variable shows up.
I do as it says but still the same problem.
I've tried both x86 and 64x jdk's and jre's but nothing seems to fix this. When i had the x86 jdk installed it couldn't find the jdk and the back-next trick wouldn't fix it.
I've also tried editing the registry like shown in this topic:
Android SDK install problem
but that didn't change anything (also, the changes doesn't appear in the export of the key i make after importing the one with the changes.)
Any help is greatly appreciated as i've tried to install this for months now
Thanks
I was also having this problem but fortunatly I found the answer in this post:
https://stackoverflow.com/questions/4588548/help-jdk-not-detected-problem-during-android-sdk-tools-setup/6051580#6051580
I know it's kinda late, but I hope it helps.
As of July 27th, using:
installer_r22.0.4-windows
jdk-7u25-windows-x64
Some say this problem is solved by replacing the "\" with "/", but that doesn't work. Some say uninstall x64 and install x86: not necessary.
I solved this problem creating the JAVA_HOME variable with the following path:
"C:\Program Files\Java\jdk1.7.0_25"
You have to include the double quotes, but you don't have to include the "bin" directory.
Oddly enough, in relation to Michael Petrotta's comment, including \bin in the JAVA_HOME environment variable will still cause even the latest version (installer_r22.0.5-windows) to fail to detect java.exe
Removing the \bin from the JAVA_HOME variable actually solved the issue on three separate machines I was trying to install the SDK on, and the SDK installed successfully
Had this problem when i typed in C:\Program Files\Java\jdk1.8.0_05\bin for JAVA_HOME environment variable. It should just be C:\Program Files\Java\jdk1.8.0_05 whitout the \bin.
And then the Android SDK installer will prompt you with this message:
Android SDK relies on the Java SE Development Kit (JDK). Java SE
Development Kit (JDK) version 1.8 has been found.
Location: C:\Program Files\Java\jdk1.8.0_05\bin\java.exe
for success must follow this steps:
1: installed you java update v.xx
2: installed you java jdk v.xx same as step 1
3: be sure you don't have other version of older installed if yes unistall
4: start installing your android sdk
5: when install stop to the java can't find go C:\Windows\System32 and find app start with java*
6: delete them in total 3 file
7: back to sdk intall and next
for me worked 1000%