libusb in Netbeans Can't find dll or lib
Quote:
Originally Posted by
Eranga
I went to the SlickSet wiki. all the links are 404.
It's so nice to know that the solution is so simple, though. NOT!!!
My bigger problem is, I'm trying to use USB ports via java. I'm trying to use libusb, and followed the instructions meticulously, but Netbeans refuses to find the native methods.
Several hours, and dozens of google query's.
-Al, K1QN
Re: Libusb DLLs in NetBeans
Removed from http://www.java-forums.org/netbeans/...rary-path.html
When you have a question, start a new thread. Don't post to an old dead thread and don't hijack another poster's thread.
db
libusb in Netbeans Can't find dll or lib
I'm trying to access usb ports via java/Netbeans.
I installed libusbjava Java libusb / libusb-win32 wrapper » News & Overview, the wrapper for the native methods, and meticulously followed the instruction for installing libusb, the native methods. I can access the wrapper side, but Netbeans refuses to access the native methods in libusb.
I don't see any way to use a dll or .lib file from Netbeans. Hundreds of google searches have been futile, and I'm beginning to believe this functionality is not part of Netbeans.
If I could get Netbeans to use a C/C++ generated lib or dll, I could take it home from there.
Also, is there an alternate solution to the initial question, USB comms via java/Netbeans?
-Al, K1QN
Re: libusb in Netbeans Can't find dll or lib
I cut/pasted the wrong address. libusbjava is hosted at Java libusb / libusb-win32 wrapper » News & Overview
Re: libusb in Netbeans Can't find dll or lib
BTW, I have also gone so far as to download other projects which use dll's, and I've been unable to get them running.
It has something to do with the way Netbeans is configured, and/or where the dll's / lib's are located on the PC.
Re: libusb in Netbeans Can't find dll or lib
Don't double post the same question. I've merged your earlier post and my response in this thread.
db
Re: libusb in Netbeans Can't find dll or lib
First off it's hardly this site's fault that external links sometimes go dead after over a year.
This is the internet, it happens.
What errors are you getting when you attempt to run your code?
Have you got a simple example app that you are attemping to use?
Re: libusb in Netbeans Can't find dll or lib
Re: libusb in Netbeans Can't find dll or lib
Here is the actual error. I thought I posted this, but it didn't show up.
run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: ch.ntb.usb.LibusbJava.usb_error_no(I)I
at ch.ntb.usb.LibusbJava.usb_error_no(Native Method)
at ch.ntb.usb.LibusbJava.<clinit>(LibusbJava.java:370 )
at usbtalk.UsbTalk.logBus(UsbTalk.java:28)
at usbtalk.UsbTalk.main(UsbTalk.java:51)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
It is triggered by the first call to libusbJava.
Re: libusb in Netbeans Can't find dll or lib
I have confirmed that java.library.path actually has a libusb0.dll in it, but if I try to manually load the dll (System.loadLibrary("libusb0.dll");), I get an error saying the file isn't in the path. I can take the text right out of the library path it reports, put it in explorer, and find the file.
Day 3 continues...
Al, K1QN
Re: libusb in Netbeans Can't find dll or lib
LibusbJava now declared total FAIL. Spent 4 days trying to get it to work. went to javax.usb and it compiled, ran, etc... on first pop.
Sayonara.
Re: libusb in Netbeans Can't find dll or lib
Just wanted to update. The problem was that there were several versions of libusb0.dll and the other file (memory fails!). So I tried all combinations, and finally hit the right combination.
I have a new problem now: reading 96kHz, 24 bit audio.