Reputation: 99
linux :: Opensuse 12.3 :: installing Apache Cordova
Hi everyone! I d'like to run the command ant
in cli but it gives me an error:
Unable to locate tools.jar. Expected to find it in /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/lib/tools.jar
Buildfile: build.xml does not exist! Build failed
I have java installed:
linux-s3z2:/srv/www/htdocs/cordova # java -version
java version "1.7.0_40"
OpenJDK Runtime Environment (IcedTea 2.4.1) (suse-8.18.1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b50, mixed mode)
and my echo $PATH looks like that
linux-s3z2:/srv/www/htdocs/cordova # echo $PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin /X11:/usr/X11R6/bin:/usr/games:/home/gdia/Documents/sdk/apache-ant-1.9.2/bin/
So there is an "ant" file in /home/gdia/Documents/sdk/apache-ant-1.9.2/bin/
for Apache ant, I don't understand why it's looking somewhere else?
Upvotes: 0
Views: 462
Reputation: 7051
The which
command will show where ant
is installed.
The error Buildfile: build.xml does not exist! Build failed
means Ant is installed.
You have to run ant
from a directory with a file named build.xml
. See the second paragraph of Running Apache Ant:
When no arguments are specified, Ant looks for a build.xml file in the current directory and, if found, uses that file as the build file and runs the target specified in the default attribute of the tag.
Upvotes: 1