Can't connect to X11 window server using ':0.0'

Can't connect to X11 window server using ':0.0'
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"

你可能感兴趣的:(Can't connect to X11 window server using ':0.0')