[Swingwt-developers] osx can run awtonswt
Status: Beta
Brought to you by:
bobintetley
From: Scott C. <sc...@co...> - 2006-03-24 06:09:48
|
I just got osx running part of awtonswt. I had to write a special version of libawt.jnilib. So far I've had to create 5 native stub methods. The standard libawt checks to see if it is running on the first thread. And if it stops the VM. SWT needs to be on the first thread. Just using the Component class loads libawt. Apple supposedly fixed this in osx 10.4, so maybe 10.4 won't need a special libawt. Since awtonswt implements all the native functionality of awt, the code in Apple's libawt isn't really needed. It seems to work if the special libawt does just enough to keep Sun's classes from throwing exceptions on initialization. I think supplying a custom libawt is ok from a legal point of view. Because of how Sun has implemented the awt classes to always load this library, it seems natural that any awt peer implementation should provide its own version of this library. The aqua look and feel doesn't work, but the metal look an feel does. It seems like the aqua laf loads a native library that depends on apples version of libawt, but I haven't confirmed this yet. Scott |