mayooran99 / javahidapi

Automatically exported from code.google.com/p/javahidapi
Other
0 stars 0 forks source link

java.lang.UnsatisfiedLinkError: com.codeminders.hidapi.HIDManager.init()V #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

i am getting the following error message when I try to run the HIDAPITest 
program provided in the source folder:

run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.codeminders.hidapi.HIDManager.init()V
    at com.codeminders.hidapi.HIDManager.init(Native Method)
    at com.codeminders.hidapi.HIDManager.<init>(HIDManager.java:65)
    at com.codeminders.hidapi.HIDManagerTest.<init>(HIDManagerTest.java:19)
    at com.codeminders.hidapi.HIDAPITest.main(HIDAPITest.java:33)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

I am using NetBeans 7.1 and running on Mac OSX 10.7.4.  JRE is 1.6

Libraries (hidapi.jar and libhidapi-jni.jnilib) are installed in 
/System/Library/Java/Extensions.  The libraries appear to be properly loaded 
and I am getting a "clean" build.  But when I attempt to run the program, I get 
the exception stated above.

Is there something else that needs to be done to get the native interface 
library working for the runtime?

Thanks,

Len

Original issue reported on code.google.com by lenha...@gmail.com on 6 Jun 2012 at 6:37

GoogleCodeExporter commented 9 years ago
Has this been resolved?

Original comment by parauten...@gmail.com on 29 Jul 2012 at 4:52

GoogleCodeExporter commented 9 years ago
Not that I am aware of

Len

Original comment by lenha...@gmail.com on 29 Jul 2012 at 6:28

GoogleCodeExporter commented 9 years ago
I'm using the hidapi.jar with included binary shared libraries/DLLs and it all 
works fine when the hidapi.jar is on my class path. Have you tried using the 
jar with included binaries, instead of using a separate library file?

Original comment by smoke.s...@gmail.com on 21 Sep 2012 at 11:59

GoogleCodeExporter commented 9 years ago
No, I will try that.

Original comment by lenha...@gmail.com on 21 Sep 2012 at 12:22

GoogleCodeExporter commented 9 years ago
The release notes indicate you must make this call to load the native library:

com.codeminders.hidapi.ClassPathLibraryLoader.loadNativeHIDLibrary()

Original comment by ladlest...@gmail.com on 23 Sep 2012 at 8:47

GoogleCodeExporter commented 9 years ago
Dear all,

   I am using silicon labs SLABHIDDevice.dll to connect silicon lab device. During execution of the code it show the error : Exception in thread "main" java.lang.UnsatisfiedLinkError: com.codeminders.hidapi.HIDManager.init()V   ...

   I kindly requesting you please advice on this issue. Your early response is always appreciated.

Thnx
Rahul

Original comment by rahulkum...@gmail.com on 20 Nov 2012 at 9:08

GoogleCodeExporter commented 9 years ago
like ladlest say
call the native library and its work for me

 try {
            ClassPathLibraryLoader.loadNativeHIDLibrary();//add this line
            HIDManager dManager = HIDManager.getInstance();
            HIDDeviceInfo[] info = dManager.listDevices();
            for (HIDDeviceInfo hIDDeviceInfo : info) {
                System.out.print(hIDDeviceInfo.getManufacturer_string());
            }
        } catch (IOException ex) {
            Logger.getLogger(formLiveReload.class.getName()).log(Level.SEVERE, null, ex);
        }

iam using netbeans 7.0.1 and windows 7

Original comment by muhammad...@gmail.com on 5 Jul 2013 at 3:18

GoogleCodeExporter commented 9 years ago
I downloaded hidapi-1.1.jar which contains native dll files.
This jar is in class path.
Write a simple program to list all usb devices attached to the system.
It throws same exception as follows.

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.codeminders.hidapi.HIDManager.init()V
    at com.codeminders.hidapi.HIDManager.init(Native Method)
    at com.codeminders.hidapi.HIDManager.<init>(HIDManager.java:53)
    at com.codeminders.hidapi.HIDManager.getInstance(HIDManager.java:121)
    at HIDAPITest.listDevices(HIDAPITest.java:98)
    at HIDAPITest.main(HIDAPITest.java:29)

Original comment by arunacha...@mcruncher.com on 3 Sep 2013 at 3:15

GoogleCodeExporter commented 9 years ago
I had problems running hidapi-1.1 on fresh Windows XP SP 3 (It worked on other 
Windows XP and Windows 7 instances though). What helped was installing 
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) 
(http://www.microsoft.com/en-us/download/details.aspx?id=5582). Before 
installing that package I saw following error in system event log: 

"Dependent Assembly Microsoft.VC90.CRT could not be found and Last Error was 
The referenced assembly is not installed on your system."

Hope that helps,
Jakub

Original comment by ja...@freeportmetrics.com on 10 Oct 2013 at 1:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Adding msvcr90.dll to the system didn't work. I'm going back to v0.1 which 
worked (uses msvcrt.dll)

Original comment by mark.jeronimus@gmail.com on 28 Aug 2014 at 8:06

GoogleCodeExporter commented 9 years ago
com.codeminders.hidapi.ClassPathLibraryLoader.loadNativeHIDLibrary();

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.codeminders.hidapi.HIDManager.init()V
    at com.codeminders.hidapi.HIDManager.init(Native Method)
    at com.codeminders.hidapi.HIDManager.<init>(HIDManager.java:75)

Same problem on windows 7 Embedded 

Original comment by romain.r...@gmail.com on 30 Jan 2015 at 3:03