64位linux报错 验证码无法显示Could not initialize class java.awt.image.BufferedImage

Could not initialize class java.awt.image.BufferedImage

 

 

只需在TOMCAT启动参数中加"-Djava.awt.headless=true \"
启动文件是:\bin\catalina.sh  
加入的上下文 是
 else
    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
      -Djava.endorsed.dirs="$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_BASE"/logs/catalina.out 2>&1 &

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

elif [ "$1" = "stop" ] ; then
加的时候注意位置(stop是关键的位置标志)

 

posted @ 2020-06-16 14:21  李建彬  阅读(822)  评论(0编辑  收藏  举报