& Ldquo; Unable to locate tools.jar & rdquo; While the environment variabl…

I want to configure my PC (Windows 7) so to use phonegap 2.7.0 and create an android application so according this tutorial I m confirured the enviroment variables.

Below are the variables we need on a configuration like this as shown in command prompt:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:UsersAdokis>echo %path%
C:Program Files (x86)AMD APPbinx86_64;C:Program Files (x86)AMD APPbinx86
;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32Win
dowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static
; C:UsersAdokisDevelopmentadt-bundle-windows-x86_64-20130514sdkplatform-to
ols;C:UsersAdokisDevelopmentadt-bundle-windows-x86_64-20130514sdktools;C:
UsersAdokisDevelopmentapache-ant-1.9.0bin;C:Program FilesJavajdk1.7.0_17

C:UsersAdokis>echo %JAVA_HOME%
c:Programs FilesJavajdk1.7.0_17

C:UsersAdokis>echo %ANT_HOME%
c:UsersAdokisDevelopmentapache-ant-1.9.0

C:UsersAdokis>

The problem is that when I use ant command an error “Unable to locate tools.jar” is shown

C:UsersAdokis>ant
Unable to locate tools.jar. Expected to find it in C:Program FilesJavajre7li
btools.jar
Buildfile: build.xml does not exist!
Build failed

I double checked all the variables which are correct but I can’t figure out why is looking tools.jar at Unable to locate tools.jar. Expected to find it in C:Program FilesJavajre7libtools.jar while the variable is configured at c:Programs FilesJavajdk1.7.0_17

Any ideas?

Download and install the Java JDK ( http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
) instead of the JRE.

Once this is done you may
need to change the %JAVA_HOME% environment variable. I’m not sure if the JDK installer does that for you.

The file tools.jar is not included in the JRE as it’s only the “Runtime Environment” and not the “Development Kit”.

Also, check the values of CLASS_PATH
and JAVA_LIB
as Ant may be using them instead of JAVA_HOME
.

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合编程 » & Ldquo; Unable to locate tools.jar & rdquo; While the environment variabl…

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录