"ant -version" returns / usr / bin / build -classpath: error: some specified banks were not found

When I type "$ ant -version" into the linux terminal window, I get 2 errors, followed by version # and when it was compiled.

First mistake:
/usr/bin/build-classpath: error: Could not find xml-commons-apis Java extension for this JVM

Second error:

/usr/bin/build-classpath: error: Some specified jars were not found

Further

Apache Ant version 1.6.5 compiled on January 6 2007

I have $ JAVA_HOME set to jdk location and added to my path

What could be causing these errors?

+4
source share
1 answer

It looks like you might have missed part of the installation .

Set the JAVA_HOME environment variables in Java, ANT_HOME to the directory into which you are not compressed Ant, and add $ {ANT_HOME} / bin (Unix) or% ANT_HOME% / bin (Windows) to your PATH. See the "Settings" section for more details.

Many JAR files used by Ant are stored in your ${ANT_HOME}/lib directory, so Ant should know where it is. Be sure to set the ANT_HOME environment ANT_HOME and set ${ANT_HOME}/bin to your path.

If the JAR file is not in your installation, you just need to manually download it and install it in the ${ANT_HOME}/lib directory. There are many tasks that do not work with a clean Ant installation and need the correct JAR.

+4
source

Source: https://habr.com/ru/post/1491491/


All Articles