[英]Find_java.exe in Android SDK doesn't find Java
I've definitely got JDK 1.6.0 installed in C:\\Program Files\\Java\\jdk1.6.0_35
, but it never seems to be able to find it when I try to open the SDK Manager. 我肯定在C:\\Program Files\\Java\\jdk1.6.0_35
安装了JDK 1.6.0,但是当我尝试打开SDK Manager时它似乎永远无法找到它。 In task manager, find_java.exe shows up until I stop it (will run for hours). 在任务管理器中,find_java.exe会一直显示,直到我停止它(将运行几个小时)。
Are there some environment variables I have to set for this to work? 我必须为此设置一些环境变量吗?
May be you are forgetting the PATH
environmental variable. 可能是你忘记了PATH
环境变量。 To check this use, 要检查这个用途,
In Unix/Linux systems, 在Unix / Linux系统中,
echo $PATH
echo $JAVA_HOME
In Windows systems, 在Windows系统中,
echo %PATH%
echo %JAVA_HOME%
If both the tests showed you empty lines, then you may need to set them again. 如果两个测试都显示空行,那么您可能需要再次设置它们。
To set them do this. 设置它们就可以了。 First try reinstalling java with UAC
turned off. 首先尝试在关闭UAC
重新安装java。 If it failed, do this at the cmd
如果失败,请在cmd
处执行此操作
SetX PATH %PATH%;<path_to_jdk/jre>\bin\
SetX JAVA_HOME <path_to_jdk/jre>
Hope it helps and thinking you are using windows. 希望它有所帮助,并认为你正在使用Windows。
As you are using Windows system, use following way to set your JAVA_HOME
and CLASSPATH
Environment variables. 在使用Windows系统时,请使用以下方法设置JAVA_HOME
和CLASSPATH
环境变量。
Windows XP Windows XP
Windows Vista: Windows Vista:
Windows 7: Windows 7的:
Now in Addition for the Linux Based System following steps used to set JAVA_HOME
and CLASSPATH
variables, 现在,除了用于设置JAVA_HOME
和CLASSPATH
变量的步骤之外,还有基于Linux的系统,
Right click and open it editor, and write following command at the end. 右键单击并打开它编辑器,最后编写以下命令。
PATH=$PATH:/opt/jdk1.6.0_21/bin export PATH JAVA_HOME=/opt/jdk1.6.0_21 export JAVA_HOME NDK_HOME=/opt/android-ndk-r8 export NDK_HOME
Save and Exit. 保存并退出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.