sandervs / javahidapi

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

ava.io.IOException:at com.codeminders.hidapi.HIDManager.listDevices(Native Method) #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I follow build instructions but...

What steps will reproduce the problem?
1. Compile with VS 2008 on Windows XP
2. add dll to jar directory
3. launch jar where I call lib: System.load(mypath + "hidapi-jni.dll")
4. call listDevices() method

What is the expected output? What do you see instead?

Expected: listing of devices.

Seen: jul 31, 2012 5:04:08 PM cbgp.hdi.AdministradorHDI getInstance
Grave: null
java.io.IOException:
        at com.codeminders.hidapi.HIDManager.listDevices(Native Method)
        at cbgp.hdi.AdministradorHDI.getInstance(AdministradorHDI.java:67)
        at cbgp.CodigoBarrasGP.main(CodigoBarrasGP.java:92)

Where AdministradorHDI extends HDIManager

What version of the product are you using? On what operating system?
- OS: windows XP
- javahidapi -> revision: 6b71216bf226

Please provide any additional information below.

- I tried to put hidapi-jni.dll in ALL system.java.path and use 
System.loadLibrary method -> doesn't work
I tried it in 64bits architecture and got expected message -> ok it's 
compilation for 32 bits OS.

I'm desesperated... I'm doing something wrong?

If there's no work around, please if someone could send me compiled 32bits 
windows dll it will save me from project disaster...

Cheers.

Original issue reported on code.google.com by calimero...@gmail.com on 31 Jul 2012 at 3:58

GoogleCodeExporter commented 8 years ago
Hi I'm a bit lost :-)

One question:

javahidapi 32 bits dll does work with XP (32bits) installed in 64 hardware 
computer? No I suppose because seems to be why I've got an error calling 
listDevices method.

I installed VS 2008 in OS WinXP in 64 hardware computer: 
I didn't found x64 option for 64 bits compilation of javahidapi. Someone could 
tell me how to do it? Windows OS too ahve to be 64bits?

Thx!!!

Original comment by calimero...@gmail.com on 31 Jul 2012 at 4:46

GoogleCodeExporter commented 8 years ago
To compile project in x64 using  VS 2008 you need install  x64 compiler. By 
default this compiler does not installed. You need to use VS installation  in 
order to do this

Original comment by dshm...@codeminders.com on 1 Aug 2012 at 10:06

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,

thank you very much. I installed x64 compiler and I compiled it with success.

I tried lib and works with Windows XP with x64 arch computer.
It fails with Windows 7 (Home Premium) BUT does work with Windows 7 in virtual 
machine installes on Linux x64 (Fedora 17).

With Windows 7 Premium 64 bits I've got same error as below:

java.io.IOException:
        at com.codeminders.hidapi.HIDManager.listDevices(Native Method)
        at cbgp.hdi.AdministradorHDI.getInstance(AdministradorHDI.java:67)
        at cbgp.CodigoBarrasGP.main(CodigoBarrasGP.java:92)

Any idea?

Original comment by calimero...@gmail.com on 1 Aug 2012 at 4:12

GoogleCodeExporter commented 8 years ago
Hi,

I've got it but it's an horrible task to complete... I suggest you should fix 
it.

If you same error is "so simple" to fix it... :s

1) create env var "devmgr_show_nonpresent_devices" put it value "1"
2) open Device Manager
3) Menu click on View then show hidden devices
4) uninstall all the faded entries (Generic USB Hub, USB devices, etc.) and 
close window
5) Search file INFCACHE.1 (commonly in C:\window\system32 or 
C:\Windows\System32\Driver Store) and DELETE IT. It will force Windows to 
regenerate a new one with actualized cache

Barbarian way to find a work around. 3 days without sleeping.

Hope it could help!!!

Original comment by calimero...@gmail.com on 1 Aug 2012 at 5:16