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>
> &lt;html&gt;&lt;head&gt;&lt;title&gt;Dynamic
> Title&lt;/title&gt;&lt;/head&gt;<br>
> &lt;%@ page language=&quot;java&quot; import=&quot;java.sql.*&quot;
> %&gt;<br>
> &lt;%@ page
> import=&quot;java.io.*,java.awt.*,java.awt.image.*,com.sun.image.codec.jpeg
>.*,java.util.*&quot; %&gt;<br>
> &lt;%@ page session=&quot;true&quot; buffer=&quot;8kb&quot;
> autoFlush=&quot;true&quot; errorPage=&quot;except.jsp&quot;
> isErrorPage=&quot;false&quot; isThreadSafe=&quot;true&quot;%&gt;<br>
> &lt;%<br>
> response.setContentType(&quot;image/jpeg&quot;);<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 &lt; 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(&quot;Serif&quot;,Font.ITALIC,48));<br>
> g.drawString(&quot;INTERNATIONAL CLUB&quot;,60,40);<br>
> g.dispose();<br>
> ServletOutputStream sos =response.getOutputStream();<br>
> JPEGImageEncoder encoder =JPEGCodec.createJPEGEncoder(sos);<br>
> encoder.encode(image);<br>
> %&gt;<br>
> &lt;/body&gt;<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&nbsp; Sammoha<br>
> Sammohat smritivibrahmah<br>
> Smritivibrahmat buddinaso<br>
> Buddhinasat pranasyati
> <dl>
> <dl>
> <dd>-Bhagvatgita</b>
> </dl>
> </dl>&quot;Anger results in delusion, delusion leads to loss in
> memory,<br>
> memory loss leads to knowledge loss, If knowledge is lost you
> perish&quot;<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

Reply via email to