jasper安装在windows环境运行正常,但是在linux环境中出现错误:java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
解决方式:
在JVM中加入-Djava.awt.headless=true
对于tomcat ,可以修改catalina.sh,加入:CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true "
例如:修改catalina.sh
# ----- Execute The Requested Command -----------------------------------------
JAVA_OPTS=-Djava.awt.headless=true
echo "Using CATALINA_BASE: $CATALINA_BASE"
echo "Using CATALINA_HOME: $CATALINA_HOME"
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
echo "Using JAVA_HOME: $JAVA_HOME"
echo "Using JAVA_OPTS: $JAVA_OPTS"
posted on 2009-11-09 15:02
无声 阅读(2152)
评论(0) 编辑 收藏 所属分类:
职场生活