Posted on 2005-11-06 16:22
廖海瀛 阅读(301)
评论(1) 编辑 收藏
当在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 "
就能解决问题.