我正在做richfaces,所有的东西似乎都能在我的开发机器(windows os)上运行。在linux机器上部署它时,我没有看到任何与richfaces组件一起提供的图像(比如对图像进行排序),并抛出了此异常。
java.lang.InternalError: Can't connect to X11 window server using 'tnsd03748:1.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)只有当代码试图在linux/unix环境中处理GUI时才会发生这种情况。也许当我添加-Djava.awt.headless=true.I时,这个问题就会得到解决,我只想知道有没有人遇到过这样的问题,有没有什么配置可以解决这个问题?
发布于 2010-10-08 20:42:06
我在CentOS上使用了richfaces,我还没有遇到过这个问题。我现在不能检查,但我猜tomcat已经默认安装为使用headless=true,所以试一试吧。
https://stackoverflow.com/questions/3890435
复制相似问题