国内更专业
计算机技术平台

Linux 64bit启动Tomcat报错Could not initialize class java.awt.image.BufferedImage

在Tomcat启动参数中加”-Djava.awt.headless=true \”

启动文件是:\bin\catalina.sh 在以下两处位置加上:-Djava.awt.headless=true \即可

shift
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-Djava.awt.headless=true \
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 "&"

else
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-Djava.awt.headless=true \
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 "&"

fi

if [ ! -z "$CATALINA_PID" ]; then
echo $! > "$CATALINA_PID"
fi

echo "Tomcat started."

赞(0) 打赏
未经允许不得转载:东云网 » Linux 64bit启动Tomcat报错Could not initialize class java.awt.image.BufferedImage

评论 抢沙发

评论前必须登录!

 

东云科技,与您偕行!

免责声明联系我们

觉得文章有用就打赏一下文章作者吧,么么哒~

支付宝扫一扫打赏

微信扫一扫打赏