1、windows下:
修改 tomcat/bin/setclasspath.bat
在
rem Otherwise either JRE or JDK are fine
之前加上
set JAVA_HOME = C:\.... jdk路径
set JRE_HOME = C:\....\jre Jre路径
2、linux环境下
修改tomcat/bin/setclasspath.sh
在
# First clear out the user classpath
下面添加上
export JAVA_HOME=/home/tool/jdk1.6.0_18 --jdk路径
export JRE_HOME=/home/tool/jdk1.6.0_18/jre --jre路径保存,重新启动tomcat即可..
本文介绍如何在Windows和Linux环境下为Tomcat正确设置JDK和JRE路径,通过修改setclasspath.bat和setclasspath.sh文件来确保Tomcat使用正确的Java环境。

5439

被折叠的 条评论
为什么被折叠?



