当前位置: 技术问答>java相关
在用SERVLET生成图形时候出错
来源: 互联网 发布时间:2015-08-08
本文导语: 500 Servlet Exception java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:134) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:64) at java.awt.i...
500 Servlet Exception
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:134)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:64)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1025)
at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1015)
at _jsp._test__jsp._jspService(/test.jsp:35)
at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
at com.caucho.jsp.Page.service(Page.java:410)
at com.caucho.server.http.Invocation.service(Invocation.java(Compiled Code))
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:239)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:498)
不知道是什么问题,谢谢!
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:134)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:64)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1025)
at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1015)
at _jsp._test__jsp._jspService(/test.jsp:35)
at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
at com.caucho.jsp.Page.service(Page.java:410)
at com.caucho.server.http.Invocation.service(Invocation.java(Compiled Code))
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:239)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:498)
不知道是什么问题,谢谢!
|
in unix, you should do it under xwindow.
Because it need the native peer to generate the image.
The other way is to find one pure java package.
Because it need the native peer to generate the image.
The other way is to find one pure java package.
|
你只需要在unix启动的时候起一下x就可以了,如果不重起系统就一直可以使用
|
java.lang.NoClassDefFoundError
X11GraphicsEnvironment
有没有呢?
X11GraphicsEnvironment
有没有呢?