[kaffe] Cannot Run Awt Program(kaffe-awt-qte)
jxq
jia_xq at etang.com
Tue Jul 15 03:15:01 PDT 2003
hello kaffe=A3=A1
I compiled kaffe using cross compile environment for my target=
( mips, linux, awt=3Dqt, 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=3Dmips-linux-gcc \
CXX=3Dmips-linux-g++ \
./configure \
--host=3Dmips-pc-linux-gnu \
--build=3Di686-linux \
--with-engins=3Dintrp \
--without-esd \
--without-alsa \
--with-awt=3Dqt \
--with-qtdir=3D/root/qte-3.1.0 \
--with-rt-jar=3D/root/rt.jar
--with-include=3D/usr/tools/mipsel-linux/include \
--with-libraries=3D/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
{
=09 public static void main(String[] args)
=09 {
=09=09 Frame frame =3D new Frame();
=09=09 frame.show();
=09 }
}
/********************/
'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?
=09
=A1=A1=A1=A1=A1=A1=A1=A1 Thanks!
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1rockjia
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1jia_xq at etang.com
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A12003-07-15
More information about the kaffe
mailing list