tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pam Withnall <>
Subject RE: Toolkit.getDefaultToolkit() error under Solaris
Date Fri, 16 Feb 2001 05:41:49 GMT
use xvfb or, add eteks classes...............................

1. use the classes from eteks
2. put system property statements in your code ( see document from eteks)
3. This works for everything  but the -Xbootclasspath, after much hair
pulling, I found the answer below
1.get  the pga classes and pga tools classes from
there is a downloaded document, go to the FAQ section. ( for system property
3.look at
( for -Xbootclasspath)
that is if you are using tomcat. I don't know what you would do if you
Then everything should work without xvfb or any other windows.
Have Fun

-----Original Message-----
From: David Bullock []
Sent: Friday, 16 February 2001 4:26 PM
Subject: Re: Toolkit.getDefaultToolkit() error under Solaris

Do a Google Search for XVFB ( X Virtual Frame Buffer ).  To use AWT stuff in
a server-side environment on Unix, you have to have access to a window
mangager - -XVFB lets you set it up without actually having to dedicate a
graphics card to the use of an X Server.

Also, make sure that you can run an example AWT or Swing app using the same
environment configuration as the server, as a check for other gotchas.

good luck,

On Thu, 15 Feb 2001, Nick Didkovsky wrote:

> Hello all,
> We are running Tomcat Version 3.2.1 on a Solaris Server.
> I've isolated a problem which boils down to a simple two liner:
> <%@ page import="java.awt.*" %>
> <%  Toolkit myToolkit = Toolkit.getDefaultToolkit(); %>
> Internal Servlet Error:
> javax.servlet.ServletException: sun/awt/motif/MToolkit
>         at java.lang.Throwable.fillInStackTrace(Native Method)
> java.lang.NoClassDefFoundError: sun/awt/motif/MToolkit
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName0(Compiled Code)
>         at java.lang.Class.forName(Compiled Code)
>         at java.awt.Toolkit$
>         at Method)
>         at java.awt.Toolkit.getDefaultToolkit(

David Bullock
LISAsoft Project Lead
Sun Certified Programmer for the Java 2 Platform 
mobile: +61 4 0290 1228

"The key ingredients of success are a crystal-clear goal, 
a realistic attack plan to achieve that goal, 
and consistent, daily action to reach that goal."

Steve Maguire, "Debugging the Development Process". 


Adelaide                  Sydney
--------------------      ------------------------
38 Greenhill Rd           Level 3, 228 Pitt Street
Wayville S.A. 5034        Sydney NSW 2000
Australia                 Australia

PH  +61 8 8272 1555       PH  +61 2 9283 0877
FAX +61 8 8271 1199       FAX +61 2 9283 0866
--------------------      ------------------------

To unsubscribe, e-mail:
For additional commands, email:

View raw message