B4J Question jDotNetBridge Question

hwatech

Member
Licensed User
Longtime User
As an exercise, I have been working with jDotNetBridge
but the posts I'm finding are pretty old so I'm wondering if this is still a valid path to pursue or is there a better way?

My first attempt at running it within the IDE produced this error:
main._appstart (java line: 57)
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/win32-x86-64/jnidispatch.dll) not found in resource path (D:\Devel\Projects\B4J\jDotNetBridge\Objects\jDotNetBridgeDemo.jar)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:776)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736)
at com.sun.jna.Native.<clinit>(Native.java:131)
at anywheresoftware.agraham.b4j.dotnetbridge.DotNetBridge.Initialize(DotNetBridge.java:111)
at b4j.example.main._appstart(main.java:57)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:108)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:95)
at b4j.example.main.start(main.java:37)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)

There has to be something I'm missing because the postings indicate that it works just fine. I believe I have all the libraries in the correct places according to the instructions. I also recompiled jna from source (https://github.com/twall/jna) using Erel's Simple Library Compiler

Any advice would be welcomed
 
Top