Closed bphagan closed 7 years ago
I think you have a mangled project build process. Normally a self-executing JAR is created using the Maven Shard plugin and it should just pull in the hid4java JAR from Maven Central. Can you explain a little more how you're configuring Eclipse?
I was trying extract require libraries and package required libraries options. I was able to get the package required libraries option to work by manually adding resources/ to the MANIFEST.MF file like this: Rsrc-Class-Path: ./ jna-4.1.0.jar resources/
Now it works as expected on Windows and Mac OS X.
But on Linux, I need to run in terminal with sudo. IS there a trick to use this without sudo?
OK, glad you got it working in your environment. The README.md
contains useful information for getting the library to work on Linux. In particular, you'll probably want to refer to this section:
https://github.com/gary-rowe/hid4java#my-device-doesnt-work-on-linux
Thanks Gary. I tried that but it didn't seem to help. No problem since most of the Linux users are familiar enough with terminal that they can just run it with sudo.
I have everything working so far within Eclipse project. I exported to create a Runnable jar file. The gui comes up but no usb connection. When I run from cmd line with console enabled, I get a resource not found error. See console text below. I tried exporting several ways but similar issue. When I open the jar file, I see a resources\win32-x86-64 folder with the hidapi.dll in it. I am sure it is something simple I am overlooking, but I can't find it.