classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK peers, testing with 1.1 JDKs


From: John Leuner
Subject: Re: GTK peers, testing with 1.1 JDKs
Date: Fri, 17 Aug 2001 12:18:23 +0000
User-agent: Mutt/1.3.18i

> Wow, on a search through my sent email (since my inbox doesn't keep
> things as long...) I found this in a previous response to you some
> time back.
> 
> You can try them yourself if you want.  Compile them (they are in the
> usual build these days) then do a little trick Jim Blair recommends
> which is to create a directory outside of classpath and symbolically
> link to classpath/lib/gnu/java/awt/peer/gtk from
> <outsidedir>/gnu/java/awt/peer.  Place <outsidedir> in your
> classpath.  Place the native/gnu.java.awt.peer.gtk/.libs in your
> LD_LIBRARY_PATH.  Using the JDK from Blackdown 1.1.x with native
> threads configured, launch some graphical program with the
> -Dawt.toolkit=gnu.java.awt.peer.gtk.GtkToolkit flag for the 'java' VM.

I don't know why the external directory and symlink is necessary. Can you 
explain?

I tried it with the IBM JDK 1.18 JDK, this was my command:

skami> echo $LD_LIBRARY_PATH
/home/jewel/kissme/cvs/lib/classpath/awt
..
Binary file 
/home/jewel/java/cvsclasspath/classpath/gnu/java/awt/peer/gtk/GtkToolkit.class 
matches
/home/jewel/java/cvsclasspath/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java:48:
    System.out.println("loading library");     
..
skami> /usr/local/jdk118/bin/java 
-Dawt.toolkit=gnu.java.awt.peer.gtk.GtkToolkit -classpath 
/usr/local/jdk118/lib/classes.zip:/home/jewel/kissme:/home/jewel/java/cvsclasspath/classpath
 kissme_test.FrameTest
loading library
init

The JVM obviously loads the native code and starts executing it, but it then 
goes into a loop, the CPU usage just goes way up and nothing happens.

In contrast, the output with my JVM is:

Dispatcher created
Starting dispatchher run loop
loading library
Looping....
init
returned
end
TRYING TO GET INTO GTKMAIN
ACQUIRED LOCK TO RUN GTKMAIN
Setting peer address@hidden for kissme_test.FrameTest(null)
Looping....
peer is null in java.awt.Label(null)
invalidating
invalidating
Looping....
Looping....

Why isn't the dispatcher starting with the IBM JVM? Is there a thread/locking 
problem here? I don't think this JVM uses emulated threads.

I tried it with the external symlink, same behaviour.

I tried a 1.2.2 blackdown JDK, but I get this error:

Exception in thread "main" java.awt.AWTError: Toolkit not found: 
gnu.java.awt.peer.gtk.GtkToolkit
        at java.awt.Toolkit$2.run(Toolkit.java:497)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:488)
        at java.awt.Window.getToolkit(Window.java:416)
        at java.awt.Frame.addNotify(Frame.java:270)
        at java.awt.Window.show(Window.java:278)
        at kissme_test.FrameTest.<init>(FrameTest.java:12)
        at kissme_test.FrameTest.main(FrameTest.java:26)

I suppose I should go find a 1.1 Blackdown JDK.

Thanks for the help and tips, I would love to get the GTK peers working with my 
JVM, it will open up a whole lot of applications that my JVM could never run 
previously.

John Leuner





reply via email to

[Prev in Thread] Current Thread [Next in Thread]