Exception information:
Caused by: Java. Lang. noclassdeffounderror: cocould not initialize class sun. AWT. x11graphicsenvironment
Caused by: Java. Lang. internalerror: Can't connect to X11 window server using 'localhost: 10.0 'as the value of the display variable.
Website verification codes are essential! In fact, I am using Java SWT classes or methods. It works normally in the Windows system development, but it needs to be deployed to the Linux operating system, especially the X11 without a graphical interface installed, there will be no support. Obviously, hardware cannot support graphics. What we need is that the client (Windows or Linux with X11) can be displayed. The solution is to add the Catalina. Sh file under the bin directory of Tomcat installation directory:
-Djava. AWT. Headless = true \
Similar to this:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/48/1F/wKioL1QFpgnSse_rAAOydVdY6fE134.jpg "Title =" qq201409021920.3.jpg "alt =" wkiol1qfpgnsse_raaoydvdy6fe134.jpg "/>
My tomcat version is 7.0.45, And I have added 8 or 9 places!
Reference: http://my.oschina.net/xiangtao/blog/28441
This article from the "Long Road, very short" blog, please be sure to keep this source http://10000001.blog.51cto.com/4600383/1548003
The Verification Code cannot be displayed, and an exception occurs on the server: cocould not initialize class sun. AWT. x11graphicsenvironment