tomcat图片问题解决方法

Linux下tomcat处理图片时需加上参数“-Djava.awt.headless=true”

linux下,如果抛出
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

解决办法是
运行时加上-Djava.awt.headless=true
例如:
export JAVA_OPTS="-Djava.awt.headless=true"

你可能感兴趣的:(thread,linux,server,window,tocmat图片)