当在linux服务器上没有装xwindows时, 处理图像时会报
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
这个错.
解决方法:
在tomcat的catalina.sh文件中
找到
# ----- Execute The Requested Command -----------------------------------------
echo "Using CATALINA_BASE: $CATALINA_BASE"
echo "Using CATALINA_HOME: $CATALINA_HOME"
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
echo "Using JAVA_HOME: $JAVA_HOME"
加入
JAVA_OPTS="-Djava.awt.headless=true "
就能解决问题.
本文地址:http://com.8s8s.com/it/it31191.htm