我正试图在Solaris11上安装apacheant。
我设置了ANT_HOME,但我一直收到这个错误:
Unable to locate tools.jar. Expected to find it in /usr/jdk/instances/jdk1.7.0/lib/tools.jar
Buildfile: build.xml does not exist!
Build failed
如何解决此问题?
听起来你要么没有安装Java JDK,要么你的Java_HOME没有指向正确的位置:
假设您配置了公共Oracle Solaris存储库:
mack@solar:~# sudo pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://pkg.oracle.com/solaris/release/
在Solaris上安装ant和Java JDK 8(在Solaris 11.3上测试):
sudo pkg install ant jdk-8
将JAVA_HOME指向JDK:
export JAVA_HOME=/usr/jdk/instances/jdk1.8.0
然后你可以测试你的蚂蚁安装:
mack@solar:~# ant
Buildfile: build.xml does not exist!
Build failed
至少您现在已经正确配置了ant。