Ubuntu 14.04 & ant: Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-7-openjdk-i386/lib/tools.jar

当我在vagrant + ubuntu 14.04,jenkins ant执行项目的build.xml时,提示:

[workspace] $ ant -file build.xml
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java--openjdk-i386/lib/tools.jar
Buildfile: /var/lib/jenkins/jobs/ibeauty-to-dev/workspace/build.xml

解决方法是安装openjdk-7-jdk 包,如:

sudo apt-get install openjdk--jdk

参考链接: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”

上一篇:全面理解.htaccess语法中RewriteCond和RewriteRule意义


下一篇:分布式缓存技术PK:选择Redis还是Memcached?