所以我在Centos6.4上以这种方式安装了java 7和javac
rpm -Uvh /path/to/binary/jdk-7u45-linux-x64.rpm
alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_45/bin/javac 200000
export JAVA_HOME="/usr/java/jdk1.7.0_45"
所以我有:
$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
$ javac -version
javac 1.7.0_45
$ ant -version
Apache Ant version 1.7.1 compiled on August 24 2010
以下是编译时遇到的错误:
BUILD FAILED
/home/user/project/build.xml:413: Class not found: javac1.7
有什么想法吗?感谢
答案 0 :(得分:0)
正如Petesh所说,ant 1.8.2支持别名编译目标。