在tomcat/bin/catalina.sh
里加入JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
例:
# OS specific support. $var _must_ be set to either true or false.
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
cygwin=false
darwin=false
os400=false
hpux=false
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin*) darwin=true;;
OS400*) os400=true;;
HP-UX*) hpux=true;;
esac