tomcat的classpath设置

在tomcat启动的时候,tomcat不会用JDK的classpath,这个是在tomcat启动的catalina.sh里面设置的

在catalina.sh的一百八十行左右的代码:

# Add on extra jar files to CLASSPATH
if [ ! -z “KaTeX parse error: Can't use function '\]' in math mode at position 12: CLASSPATH" \̲]̲ ; then CLASS…CLASSPATH”:
fi
CLASSPATH=“ C L A S S P A T H " " CLASSPATH"" CLASSPATH""CATALINA_HOME”/bin/bootstrap.jar

if [ -z “KaTeX parse error: Can't use function '\]' in math mode at position 16: CATALINA\_OUT" \̲]̲ ; then CATAL…CATALINA_BASE”/logs/catalina.out
fi

if [ -z “KaTeX parse error: Can't use function '\]' in math mode at position 19: …ALINA\_TMPDIR" \̲]̲ ; then \# De…CATALINA_BASE”/temp
fi

# Add tomcat-juli.jar to classpath
# tomcat-juli.jar can be over-ridden per instance
if [ -r "KaTeX parse error: Can't use function '\]' in math mode at position 37: …mcat-juli.jar" \̲]̲ ; then CLASS…CLASSPATH: C A T A L I N A _ B A S E / b i n / t o m c a t − j u l i . j a r e l s e C L A S S P A T H = CATALINA\_BASE/bin/tomcat-juli.jar else CLASSPATH= CATALINA_BASE/bin/tomcatjuli.jarelseCLASSPATH=CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar
fi

如果需要把自己的目录加进去的话,在下面加一句

# Add tomcat-juli.jar to classpath
# tomcat-juli.jar can be over-ridden per instance
if [ -r "KaTeX parse error: Can't use function '\]' in math mode at position 37: …mcat-juli.jar" \̲]̲ ; then CLASS…CLASSPATH: C A T A L I N A _ B A S E / b i n / t o m c a t − j u l i . j a r e l s e C L A S S P A T H = CATALINA\_BASE/bin/tomcat-juli.jar else CLASSPATH= CATALINA_BASE/bin/tomcatjuli.jarelseCLASSPATH=CLASSPATH: C A T A L I N A _ H O M E / b i n / t o m c a t − j u l i . j a r f i C L A S S P A T H = CATALINA\_HOME/bin/tomcat-juli.jar fi CLASSPATH= CATALINA_HOME/bin/tomcatjuli.jarfiCLASSPATH=CLASSPATH:自己的目录

然后重启

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值