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:
I was very interested to see your work with SWT, but the ControlExample.exe throws the following exception right at startup:
Unhandled Exception: System.NullReferenceException: Object reference not set toan instance of an object. at LocalRefStruct.UnwrapLocalRef(IntPtr localref) at JNIEnv.UnwrapRef(JNIEnv* , _jobject* o) at JNIEnv.InvokeHelper(JNIEnv* , _jobject* object, _jmethodID* methodID, jvalue* args) at JNIEnv.CallIntMethodA(JNIEnv* , _jobject* obj, _jmethodID* methodID, jvalue* args) at org.eclipse.swt.internal.win32.OS.EnableWindow(Int32 , Boolean ) at org.eclipse.swt.widgets.Control.setEnabled(Boolean ) at org.eclipse.swt.examples.controlexample.DialogTab.createControlWidgets() at org.eclipse.swt.examples.controlexample.Tab.createTabFolderPage(TabFolder) at org.eclipse.swt.examples.controlexample.ControlExample..ctor(Composite ) at org.eclipse.swt.examples.controlexample.ControlExample.main(String )
I also tried to compile the swt AddressBook example using ikvmc which generated the following error:
D:projectssample-projectsclasses>ikvmc C:j2sdk1.4.1jrelibjce.jar C:j2sdk1.4.1jrelibrt.jar D:projectssample-projectslibswt.jar -reference:c:ikvmbinclasspath.dll -out:Test.exe -target:exe -main:org.eclipse.swt.examples.addressbook.AddressBookParsing class filesConstructing compilerLoading remapped typesCompiling class files (1)java.lang.VerifyError: Cannot inherit from final class
Could you possibly point me in the right direction on what I am doing incorrectly. Thanks.
I apologize for the lameness of this, but the comment spam was driving me nuts.
In order to be able to post a comment, you need to answer a simple question. Hopefully this question
is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.
Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the
one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)
Powered by: newtelligence dasBlog 2.3.12105.0
© Copyright 2017, Jeroen Frijters