[kaffe] [1.1.1] patch to fix --with-awt=qt, problem w/ applets

Bernhard Rosenkraenzer bero at arklinux.org
Tue Aug 19 14:13:02 PDT 2003


Hi,
we've just added Kaffe to Ark Linux.
We've had to patch a couple of things to get it to do work as we expect:

1. --with-awt=qt doesn't compile (Qt 3.2.0, gcc 3.3.1)
   The problem is confusion about CheckException() vs. ExceptionCheck()
2. If both qt and qt-mt are installed, kaffe uses qt unconditionally.
   Preferring qt-mt is probably preferrable because that's what KDE uses 
   and therefore it's usually in memory [I assume that people who want
   --with-awt=qt are mostly KDE users]


Patches attached; works nicely now for a couple of test apps I've tried.

Has anyone succeeded in using kaffe for Java applet handling in Konqueror 
yet? On my box, it displays "Loading Applet", the and the throbber keeps 
turning forever.
Running appletviewer on a sample applet [any applet I've tried] results in
tlkProperties
qapp initialization.

tlkInit Done.
tlkGetScreenWidth
tlkGetScreenHeight
tlkGetResolution
Native AWT ---->evtInit
tlkVersion
Native AWT ---->fntInitFont...Default
Native AWT ---->fntInitFont...Default
Native AWT ---->fntInitFont...Default
Native AWT ---->fntInitFont...Monospaced
Native AWT ---->fntInitFont...Default
Native AWT ---->fntInitFont...Default
Native AWT ---->fntInitFont...Default
Native AWT ---->fntInitFont...Default
Native AWT ---->fntGetFixedWidth 0
Native AWT ---->fntIsWideFont
tlkDisplayBanner
Native AWT ---->fntGetFixedWidth 0
Native AWT ---->fntIsWideFont
Native AWT ---->fntInitFont...SansSerif
Native AWT ---->fntGetFixedWidth 0
Native AWT ---->fntIsWideFont
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/NullPointerException
Aborted


LLaP
bero

-- 
Ark Linux - Linux for the masses
http://www.arklinux.org/

Redistribution and processing of this message is subject to
http://www.arklinux.org/terms.php
-------------- next part --------------
--- kaffe/include/jni_cpp.h.ark	2003-08-19 21:32:19.000000000 +0200
+++ kaffe/include/jni_cpp.h	2003-08-19 21:32:32.000000000 +0200
@@ -1201,9 +1201,9 @@
 	return (functions->GetJavaVM(this, a));
 }
 
-inline jboolean JNIEnv::CheckException(void)
+inline jboolean JNIEnv::ExceptionCheck(void)
 {
-	return (functions->CheckException(this));
+	return (functions->ExceptionCheck(this));
 }
 
 #endif
-------------- next part --------------
--- kaffe-1.1.1/gwqt.m4.ark	2003-08-19 20:55:28.000000000 +0200
+++ kaffe-1.1.1/gwqt.m4	2003-08-19 20:56:02.000000000 +0200
@@ -93,20 +93,20 @@
             fi
         fi
 
-        if test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
-            QT_LIB="-lqt"
-            QT_IS_MT="no"
-        elif test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
+        if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
             QT_LIB="-lqt-mt"
             QT_IS_MT="yes"
-        elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
-            QT_LIB="-lqte"
+        elif test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqt"
             QT_IS_MT="no"
-            QT_IS_EMBEDDED="yes"
         elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
             QT_LIB="-lqte-mt"
             QT_IS_MT="yes"
             QT_IS_EMBEDDED="yes"
+        elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqte"
+            QT_IS_MT="no"
+            QT_IS_EMBEDDED="yes"
         fi
         ;;
 	
--- kaffe-1.1.1/configure.ark	2003-08-19 20:56:06.000000000 +0200
+++ kaffe-1.1.1/configure	2003-08-19 20:56:27.000000000 +0200
@@ -40858,20 +40858,20 @@
             fi
         fi
 
-        if test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
-            QT_LIB="-lqt"
-            QT_IS_MT="no"
-        elif test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
+        if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
             QT_LIB="-lqt-mt"
             QT_IS_MT="yes"
-        elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
-            QT_LIB="-lqte"
+        elif test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqt"
             QT_IS_MT="no"
-            QT_IS_EMBEDDED="yes"
         elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
             QT_LIB="-lqte-mt"
             QT_IS_MT="yes"
             QT_IS_EMBEDDED="yes"
+        elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqte"
+            QT_IS_MT="no"
+            QT_IS_EMBEDDED="yes"
         fi
         ;;
 


More information about the kaffe mailing list