define( 'WPCACHEHOME', '/srv/www/' ); //Added by WP-Cache Manager ant | Ian Chilton


Posts Tagged ‘ant’

Fixing the Ubuntu “Unable to locate tools.jar” Error

June 14th, 2011 No comments

When trying to use ant on Ubuntu (in either 10.04 or 10.10), I get the following error:
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar

Turns out the fix is quite simple:

Edit /etc/apt/sources.list, find the lines similar to the following and uncomment them (obviously 10.04 will have lucid instead of maverick):
deb maverick partner
deb-src maverick partner

sudo apt-get update && apt-get install sun-java6-jdk
sudo update-alternatives --config java

Pick the option for: /usr/lib/jvm/java-6-sun/jre/bin/java which was number 2 on mine, rather than the openjdk default.

You now shouldn’t get that warning/error.

Categories: Linux Tags: ,