Crystal Clear出现Could not initialize class sun.a...

系统使用Websphere 5,相应的jdk是1.3,因此没法使用headless模式-Djava.awt.headless=true解决这个问题。

在jdk1.3下的有几个比较重要的步骤:

1. 出现java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
用export DISPLAY=:100
<machine name>:<server number>.<screen number>
<machine name>默认是localhost
<screen number>>默认是0

2. 若是上述步骤后出现Can't connect to X11 window server using ':100' as the value of the DISPLAY variable.
用xhost+local machine name
固然最简单是xhost+,这样能够让全部机器访问这台服务器

3. 以前遇到的问题使用上述两个步骤就能够解决了,但有个前提是已经安装了Xvfb(Virtual X11 Frame Buffer),使用命令
ps -ef|grep X
AIX显示结果以下:
root   3420   5236   0   Jan 03      -  5:02 /usr/lpp/X11/bin/X -x abx -x dbe -x GLX -D /usr/lib/X11//rgb -T -force :0 -auth /var/dt/A:0-SVfhqa
root  25812      1 120   Jan 03      - 32714:55 /usr/bin/X11/X -force -vfb -x abx -x dbe -x GLX :100

参考:
http://www.websina.com/bugzero/faq/exception-x11.html
http://download.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/xserver.html
相关文章
相关标签/搜索