Native calls - jclDevice 
|
|
I'm implmenting an eRCP application for a PDA using IBM Lotus Expeditor 6.1 under Eclipse. Right now I would like to make a native call of the methods of a DLL using either JNI or JInvoke. Unfortunately I haven't managed to make such calls till now. When I try to use JNI by first loading the dll file with the System.load command and make the native method call during runtime, I get the following error:
java.lang.UnsatisfiedLinkError: mobile/coaching/InvokeNative._ANT_AssignChanell(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z at mobile.coaching.InvokeNative.init(InvokeNative.java:16) at mobile.coaching.UI$4.widgetSelected(UI.java:184) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:475) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1382) at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source) at org.eclipse.ui.internal.Workbench.runUI(Unknown Source) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source) at com.ibm.ercp.hworkbench.eWorkbench.run(Unknown Source) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:213) at java.lang.reflect.Method.invoke(Method.java:278) at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Unknown Source) at org.eclipse.core.launcher.Main.run(Unknown Source) at org.eclipse.core.launcher.Main.main(Unknown Source) Unhandled event loop exception Reason: java.lang.UnsatisfiedLinkError: mobile/coaching/InvokeNative._ANT_AssignChanell(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z at mobile.coaching.InvokeNative.init(InvokeNative.java:16) at mobile.coaching.UI$4.widgetSelected(UI.java:184) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:475) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1382) at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source) at org.eclipse.ui.internal.Workbench.runUI(Unknown Source) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source) at com.ibm.ercp.hworkbench.eWorkbench.run(Unknown Source) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source) at java.lang.ref
lect.AccessibleObject.invokeL(AccessibleObject.java:213) at java.lang.reflect.Method.invoke(Method.java:278) at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Unknown Source) at org.eclipse.core.launcher.Main.run(Unknown Source) at org.eclipse.core.launcher.Main.main(Unknown Source) mobile/coaching/InvokeNative._ANT_AssignChanell(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
JInvoke, on the other hand, supports only Java JDK versions 5 and above. Since the compliance level for, both, jclDevice and jclDesktop is 1.4, JInvoke wouldn't work for native calls either. (Is there probably an option to change the complicance level?)
Does somebody know if (and how) it is possible to make such native method calls within the Lotus Expeditor environment?
I would really appreciate any help or hints, best regards!
|
|
|
|
| Version 4 |
February 24, 2009 |
9:54:48 AM |
by Hristo Novatchkov |
|
|