testing xlib peers

stewart@neuron.com stewart@neuron.com
Fri May 18 06:54:00 GMT 2001


>> is there any updated info on how to make this work?
> 
> Compile with something like "-Dawt.toolkit=gnu.awt.xlib.XToolkit" to
> set the awt.toolkit system property. We should probibly change
> Toolkit.getDefaultToolkit() to look for xlib peers if the gtk ones
> can't be found.


It now yields a more interesting error:

Exception in thread "main" java.lang.NullPointerException
   at 0x4015240c: _Jv_ThrowSignal (/home/stewart/gcc/lib/libgcj.so.2)
   at 0x4015244d: _Jv_ThrowSignal (/home/stewart/gcc/lib/libgcj.so.2)
   at 0x4024246e: java.awt.BorderLayout.calcSize(java.awt.Dimension,
java.awt.Dimension, java.awt.Dimension, java.awt.Dimension,
java.awt.Dimension, java.awt.Container) (/home/stewart/gcc/lib/libgcj.so.2)
   at 0x4024202b:
java.awt.BorderLayout.preferredLayoutSize(java.awt.Container)
(/home/stewart/gcc/lib/libgcj.so.2)
   at 0x402497ce: java.awt.Container.getPreferredSize()
(/home/stewart/gcc/lib/libgcj.so.2)
   at 0x402554d4: java.awt.Window.pack() (/home/stewart/gcc/lib/libgcj.so.2)
   at 0x08048b6b: a.main(java.lang.String[])
(/home2/stewart/devel/current/gcj/awt/a.java:9)
   at 0x401690bb: gnu.gcj.runtime.FirstThread.run()
(/home/stewart/gcc/lib/libgcj.so.2)
   at 0x40173f32: java.lang.Thread.run_(java.lang.Object)
(/home/stewart/gcc/lib/libgcj.so.2)
   at 0x40280d85: _Jv_ThreadSetPriority(_Jv_Thread_t, int)
(/home/stewart/gcc/lib/libgcj.so.2)
   at 0x4059162c: GC_start_routine (/home/stewart/gcc/lib/libgcjgc.so.1)
   at 0x405ab817: pthread_detach (/lib/libpthread.so.0)
   at 0x406b252a: __clone (/lib/libc.so.6)

eliminating the Button eliminates the error. replacing it with a Label
causes the app to crash.

my goal really isn't to use the xlib peers, so if there's a way to use gtk
widgets, that would be preferrable.

thanks,

stewart




More information about the Java mailing list