tomcat中JDK安装:
解压,将解压后的目录放入到/usr/local/下;
vim /etc/profile.d/java.sh
JAVA_HOME=/usr/local/jdk1.8.0_31
JAVA_BIN=/usr/local/jdk1.8.0_31/bin
JRE_HOME=/usr/local/jdk1.8.0_31/jre
PATH=$PATH:/usr/local/jdk1.8.0_31/bin:/usr/local/jdk1.8.0_31/jre/bin
CLASSPATH=/usr/local/jdk1.8.0_31/jre/lib:/usr/local/jdk1.8.0_31/lib:/usr/local/jdk1.8.0_31/
jre/lib/charsets.jar
初始化:source /etc/profile.d/java.sh
如果配置没有问题应该可以看到Java的版本信息;
java -version
时间: 2024-10-12 22:21:46