java.awt.Toolkit problem

Glynn Clements glynn at sensei.co.uk
Fri Oct 2 03:14:49 PDT 1998


Tomas Sieger wrote:

> I've got problems with this program:
> 
> import java.awt.*;
> public class A  {
>     public static void main(String[] args)  {
> System.out.println(Toolkit.getDefaultToolkit().getClass().getName());
>     }
> }
> 
> It causes:
> 
> java.lang.NullPointerException
>     at java/awt/Color.<init>(50)
>     at java/awt/Color.<clinit>(18)
>     at java/awt/Defaults.<clinit>(51)
>     at java/awt/Toolkit.<clinit>(45)

> What's wrong?

Kaffe's java.awt is totally broken w.r.t. Toolkits.

Contrary to the spec (or at least all of the versions which I've
seen), Kaffe's java.awt.Toolkit isn't abstract, and all of the
Component classes use hardwired methods instead of the Peer mechanism.

Given that fixing it could be a lot of work, without any real benefit
for the average user, I wouldn't expect it to be fixed any time soon.

-- 
Glynn Clements <glynn at sensei.co.uk>


More information about the kaffe mailing list