You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the usb4java website under Native Libs it states:
"usb4java only extracts the files into a temporary directory when they are inside a JAR file."
but what exactly does this mean?
Does it mean that if I generate my own libusb4java-1.3.0-win32-x86-64.jar and don't put another inside it then useb4java will not load the embedded dll?
I've not had a problem using the libusb4java wrappers with Java8 but with J21 when using modules it is problematic since usb4java is non-modular. I have an app that runs fine in cmdline but when run in Eclipse fails with the stracktrace:
Exception in thread "main" java.lang.ExceptionInInitializerError
...
Caused by: org.usb4java.LoaderException: Native library not found in classpath: /org/usb4java/win32-x86-64/libusb4java.dll
at usb4java@1.3.0/org.usb4java.Loader.extractLibrary(Loader.java:246)
at usb4java@1.3.0/org.usb4java.Loader.load(Loader.java:323)
at usb4java@1.3.0/org.usb4java.LibUsb.(LibUsb.java:690)
... 6 more
I can't see how to resolve this if I want to use the native libs directly because we have to call LibUsb.init() - the library demands it. But in doing so it ends up in Loader.load() and then Loader.extractLibrary() where the LoaderException is thrown because it can't resolve the path.
So, how does one realise this statement without a switch for bypassing this attempt to load a native?:
"usb4java only extracts the files into a temporary directory when they are inside a JAR file."
The text was updated successfully, but these errors were encountered:
On the usb4java website under Native Libs it states:
"usb4java only extracts the files into a temporary directory when they are inside a JAR file."
but what exactly does this mean?
Does it mean that if I generate my own libusb4java-1.3.0-win32-x86-64.jar and don't put another inside it then useb4java will not load the embedded dll?
I've not had a problem using the libusb4java wrappers with Java8 but with J21 when using modules it is problematic since usb4java is non-modular. I have an app that runs fine in cmdline but when run in Eclipse fails with the stracktrace:
Exception in thread "main" java.lang.ExceptionInInitializerError
...
Caused by: org.usb4java.LoaderException: Native library not found in classpath: /org/usb4java/win32-x86-64/libusb4java.dll
at usb4java@1.3.0/org.usb4java.Loader.extractLibrary(Loader.java:246)
at usb4java@1.3.0/org.usb4java.Loader.load(Loader.java:323)
at usb4java@1.3.0/org.usb4java.LibUsb.(LibUsb.java:690)
... 6 more
I can't see how to resolve this if I want to use the native libs directly because we have to call LibUsb.init() - the library demands it. But in doing so it ends up in Loader.load() and then Loader.extractLibrary() where the LoaderException is thrown because it can't resolve the path.
So, how does one realise this statement without a switch for bypassing this attempt to load a native?:
"usb4java only extracts the files into a temporary directory when they are inside a JAR file."
The text was updated successfully, but these errors were encountered: