Ubuntu 12.04.1 LTS & ant: Resolve “Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar”

I recently got the following error when I tried to run ant on a fresh installed Ubuntu 12.04.1 LTS machine:

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar

The solution was to install the openjdk-6-jdk package as follows:

#sudo apt-get install openjdk-6-jdk

Hope this helps somebody…

Comments

  1. Marc Dix

    You saved my day. Thanks bro’.

  2. Dan

    Much appreciated! You probably just saved me at least an hour 🙂

Leave a comment

Your email address will not be published. Required fields are marked *

*