[kaffe] Cannot Run Awt Program(kaffe-awt-qte)
jxq
jia_xq at etang.com
Tue Jul 15 03:15:01 PDT 2003
hello kaffe!
I compiled kaffe using cross compile environment for my target ( mips, linux, awt=qt, crosscompiler tool chain mips-linux-gcc).qte is qt-embedded-free-3.1.0,crosscompiler installed in the /usr/tools/mipsel-linux,qte installed in the /root/qte-3.1.0.
1) I configured a kaffe with the following options:
export CC=mips-linux-gcc \
CXX=mips-linux-g++ \
./configure \
--host=mips-pc-linux-gnu \
--build=i686-linux \
--with-engins=intrp \
--without-esd \
--without-alsa \
--with-awt=qt \
--with-qtdir=/root/qte-3.1.0 \
--with-rt-jar=/root/rt.jar
--with-include=/usr/tools/mipsel-linux/include \
--with-libraries=/usr/tools/mipsel-linux/lib \
2) make
'make' is ok!
3) make install
'make install' is ok too! and create a tree in the /usr/local/kaffe.
4) I copy the /usr/local/kaffe directory to my mips machine
I run HelloWorld.class,It is right!
I write a very simple awt program as following:
/** FirstFrame.java **/
import java.awt.*;
public class FirstFrame
{
public static void main(String[] args)
{
Frame frame = new Frame();
frame.show();
}
}
/********************/
'Kjc Myprogram.java' is ok, create Myprogram.class,then I use 'kaffe Myprogram' to run this class,the following error happened:
java.lang.ExceptionInInitializerError: [exception was java.lang.NullPointerException]
at FirstFrame.main(FirstFrame.java:6)
java.lang.NullPointerException
at java.awt.Toolkit.tlkProperties(Toolkit.java:native)
at java.awt.Toolkit.<clinit>(Toolkit.java:108)
at java.awt.Color.setNativeValue(Color.java:285)
at java.awt.Color.<clinit>(Color.java:54)
at java.awt.Defaults.<clinit>(Defaults.java:144)
at java.awt.Window.<init>(Window.java:34)
at java.awt.Window.<clinit>(Window.java:26)
at FirstFrame.main(FirstFrame.java:6)
What is the wrong...?
Can someone help me?
Thanks!
rockjia
jia_xq at etang.com
2003-07-15
More information about the kaffe
mailing list