Failed to convert path to a short DOS path: C:\Windows\system32\java.exe的解决

来源:互联网 发布:华讯网络是国企么 编辑:程序博客网 时间:2024/05/17 04:26

今天想把eclipse的android开发环境升级下,改用4.0的sdk,下载了个android-sdk_r21-windows.zip后,再运行里面的SDK manager,之后在eclipse中居然不能运行SDK manager了,提示是Failed to convert path to a short DOS path: C:\Windows\system32\java.exe,网上查阅了下,似乎是用64位系统的原因,参考别人的办法,找到SDK目录下的find_java.bat文件夹,修改下列两行,去掉-s参数

for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a

for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a

变成

for /f %%a in ('%~dps0\find_java.exe') do set java_exe=%%a

for /f %%a in ('%~dps0\find_java.exe -w') do set javaw_exe=%%a

就OK了。

记录一下,提醒自己