[Top][All Lists]

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

Re: GTK peers, testing with 1.1 JDKs

From: Brian Jones
Subject: Re: GTK peers, testing with 1.1 JDKs
Date: 01 Sep 2001 09:08:04 -0400
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

John Leuner <address@hidden> writes:

> > 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/ in your
> > LD_LIBRARY_PATH.  Using the JDK from Blackdown 1.1.x with native
> > threads configured, launch some graphical program with the
> > 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/
>     System.out.println("loading library");   
> ..
> skami> /usr/local/jdk118/bin/java 
> -classpath 
> /usr/local/jdk118/lib/
>  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
> 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: 
>       at java.awt.Toolkit$
>       at Method)
>       at java.awt.Toolkit.getDefaultToolkit(
>       at java.awt.Window.getToolkit(
>       at java.awt.Frame.addNotify(
>       at
>       at kissme_test.FrameTest.<init>(
>       at kissme_test.FrameTest.main(
> 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.

Okay, took me a while to get to trying this.  I tried Sun's latest
1.3.1 VM for kicks.  This works pretty well with the client hotspot VM
(which is native threads).  You can't use the classic VM because it is
green threads.  I actually can run the attached program and get
basically the same thing as with just Sun's VM.

Brian Jones <address@hidden>

Description: Binary data

reply via email to

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