Pages

Friday, April 20, 2012

Apache ANT error : Unable to locate tools.jar

Problem Statement: While doing an ant build, if you get an error message saying
Unable to locate tools.jar

Problem Solution:
Follow the steps to resolve this issue.
  1. See if you have environment variable names JAVA_HOME, if not create it
  2. In Linux and Mac, Copy following statement and append to /etc/profile or .bashrc file, make systec set JAVA_HOME into system environment variable.
    export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.06"
  3. In Windows, go to environment variables and add new variable with name JAVA_HOME and the value as Java's location wherever installed.

No comments:

Post a Comment