theboyaply
theboyaply
发布于 2021-05-25 / 383 阅读
0
0

TOMCAT设置启动参数

TOMCAT设置启动参数

tomcat/bin目录下的catalina.bat文件已经给了解决方案了,里面注释有如下内容:

#!/bin/sh

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -----------------------------------------------------------------------------
# Control Script for the CATALINA Server
#
# Environment Variable Prerequisites
#
#   Do not set the variables in this script. Instead put them into a script
#   setenv.sh in CATALINA_BASE/bin to keep your customizations separate.
#
#   CATALINA_HOME   May point at your Catalina "build" directory.

注意后面的那句话:

Do not set the variables in this script. Instead put them into a script

setenv.sh in CATALINA_BASE/bin to keep your customizations separate.

额外的变量可以设置在setenv.sh里面,如果没有这个文件,自己创建一个即可。比如:

#!/bin/sh

JAVA_OPTS="$JAVA_OPTS -Dxxx=abc"

-- end --


评论