java.awt.Toolkit problem

Tomas Sieger TSIE4391 at barbora.mff.cuni.cz
Fri Oct 2 02:30:52 PDT 1998


Hi !

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)


Hint: use AWT graphics (just draw a frame) before calling
Toolkit.getDefaultToolkit(). It helps!

I run Kaffe 1.0.b1 (kaffe-1.0.b1-1.i386.rpm)
on RedHat Intel Linux 5.0 (Hurricane) 

What's wrong?

    Thanks in advance

        Tomas Sieger




More information about the kaffe mailing list