器量大者,福泽必厚
全部博文(587)
分类: LINUX
2013-05-23 16:17:25
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
很奇怪在测试环境下正常,而在服务器环境下,却报错! 这里解决了大概30分钟的时间,
原因: 我配置了vnc,修改了$DISPLAY的值!
在测试环境下见附件!
在生产环境下的值见附件!
显然这两个数值已经不同!
只需要修改为:
#!/bin/sh