安装tomcat-native时如果报错 "Can’t locate a valid JDK location" 使用下面方式解决。
原因是程序只会到以下默认的目录寻找JDK:
configure: [/ usr/local/1.6.1]
configure: [/ usr/local/IBMJava2-1.6.0]
configure: [/ usr/local/java1.6.0]
configure: [/ usr/local/java-1.6.0]
configure: [/ usr/local/jdk1.6.0]
configure: [/ usr/local/jdk-1.6.0]
configure: [/ usr/local/1.6.0]
configure: [/ usr/local/IBMJava2-1.6]
configure: [/ usr/local/java1.6]
configure: [/ usr/local/java-1.6]
configure: [/ usr/local/jdk1.6]
configure: [/ usr/local/jdk-1.6]
根据java版本建立软链接即可:
ln -s /usr/java/jdk1.7.0_25 /usr/local/jdk-1.6
或
ln -s /usr/java/jdk1.8.0_51 /usr/local/jdk-1.6