Updated: 3/13/2003; 2:20:45 PM.
IKVM.NET Weblog
The development of a Java VM for .NET
        

Tuesday, December 03, 2002
This weblog has moved to http://weblog.ikvm.net/

I've been working on getting the SWT (the Eclipse windowing toolkit) examples to run. This mostly involved implementing a lot of JNI methods.

The examples now run, but they do run into the occasional random NullPointerException. Probably caused by a sneaky bug in the (un)managed C++ code.

Here is a statically compiled version ControlExample (including all the supporting DLLs needed).

Note that this will only run on Windows, because my JNI implementation is written in Managed C++ it will not run on Mono.

Some interesting findings:

  • SWT has a reference to the sun.awt.windows.WEmbeddedFrame class. What's that about?
  • In order to get the FileViewer example to run, I had to use the STAThread attribute on my main method. Boy I'm I glad I missed the whole COM thing (was busy doing Java). This just too lame.
  • Reflection.Emit does not support embedding resources in a module (lame!). I had to add resource support to ikvmc (and the VM) to get ControlExample to work, statically compiled, so I added initialized global public fields to the assembly and used System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray to copy the field data to an array.

9:32:32 AM    Comments

© Copyright 2003 Jeroen Frijters.
 
December 2002
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Nov   Jan