This is a general Java issue. It comes up fairly frequently as a support request on our project (JFreeChart): there is some information posted in the support forum about it, it may help you:
http://www.object-refinery.com/phorum-3.3.2a/read.php?f=2&i=2987&t=2987 Regards, Dave Gilbert JFreeChart Project Leader On Tuesday 03 September 2002 9:58 am, VTR Ravi Kumar wrote: > <html> > <font face="Courier New, Courier">This is the error which i get when I > try to generate a random title using the source given at the end can > anyone tell what the problme might be.<br> > <br> > <br> > java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment<br> > at java.lang.Class.forName0(Native Method)<br> > at java.lang.Class.forName0(Compiled Code)<br> > at java.lang.Class.forName(Compiled Code)<br> > at > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironmen >t.java:63)<br> at > java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1009)<br> > at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:998)<br> > at test.aa_1._jspService(Compiled Code)<br> > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)<br> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)<br> > at > org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)< >br> at org.apache.tomcat.core.Handler.invoke(Compiled Code)<br> > at org.apache.tomcat.core.Handler.service(Compiled Code)<br> > at > org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)<br >> at org.apache.tomcat.core.ContextManager.internalService(Compiled > Code)<br> > at org.apache.tomcat.core.ContextManager.service(Compiled Code)<br> > at > org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Compil >ed Code)<br> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)<br> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled > Code)<br> > at java.lang.Thread.run(Thread.java:485)<br> > <br> > <br> > source<br> > <br> > xyz.jsp<br> > <br> > <html><head><title>Dynamic > Title</title></head><br> > <%@ page language="java" import="java.sql.*" > %><br> > <%@ page > import="java.io.*,java.awt.*,java.awt.image.*,com.sun.image.codec.jpeg >.*,java.util.*" %><br> > <%@ page session="true" buffer="8kb" > autoFlush="true" errorPage="except.jsp" > isErrorPage="false" isThreadSafe="true"%><br> > <%<br> > response.setContentType("image/jpeg");<br> > int width=780, height=50,col=256;<br> > BufferedImage image = new BufferedImage(width, height, > BufferedImage.TYPE_INT_RGB);<br> > Graphics g = image.getGraphics();<br> > Random random = new Random();<br> > g.setColor(new Color(218,254,random.nextInt(height)+200));<br> > g.fillRect(0, 0, width, height);<br> > Polygon poly = new Polygon();<br> > for (int i=0; i < 20; i++) {<br> > poly.addPoint(random.nextInt(width),random.nextInt(height));<br> > }<br> > g.setColor(new > Color(random.nextInt(height),random.nextInt(col),random.nextInt(col)));<br> > g.fillPolygon(poly);<br> > g.setColor(new > Color(random.nextInt(col),random.nextInt(col),random.nextInt(height)+200)); ><br> g.setFont(new Font("Serif",Font.ITALIC,48));<br> > g.drawString("INTERNATIONAL CLUB",60,40);<br> > g.dispose();<br> > ServletOutputStream sos =response.getOutputStream();<br> > JPEGImageEncoder encoder =JPEGCodec.createJPEGEncoder(sos);<br> > encoder.encode(image);<br> > %><br> > </body><br> > <br> > regards<br> > <br> > vtr<br> > </font><br> > > > <dl> > <dd>V.T.R.Ravi Kumar <tt> > <dd>Engineer, ITX, > <dd>Bharat Heavy Electrical Ltd., </tt> > </dl>=====================================================================< >br> <div align="center"> > <b>Krodhad bhavati Sammoha<br> > Sammohat smritivibrahmah<br> > Smritivibrahmat buddinaso<br> > Buddhinasat pranasyati > <dl> > <dl> > <dd>-Bhagvatgita</b> > </dl> > </dl>"Anger results in delusion, delusion leads to loss in > memory,<br> > memory loss leads to knowledge loss, If knowledge is lost you > perish"<br> > </div> > =====================================================================<br> > <br> > </html> > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
