Results 1 to 12 of 12
  1. #1
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default libusb in Netbeans Can't find dll or lib

    Quote Originally Posted by Eranga View Post
    You should look at this first of all.

    SlickSet - NetBeans Wiki
    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

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: Libusb DLLs in NetBeans

    Removed from How to place the DLL file in java.library.path??

    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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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

  4. #4
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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

  5. #5
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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.

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default 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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default 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?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default Re: libusb in Netbeans Can't find dll or lib

    I'm running the example at http://libusbjava.sourceforge.net/wp...gBus.java.html.

    -Thanks.

  9. #9
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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.

  10. #10
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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

  11. #11
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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.

  12. #12
    alpg49 is offline Member
    Join Date
    May 2012
    Posts
    12
    Rep Power
    0

    Default 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.

Similar Threads

  1. Replies: 8
    Last Post: 03-10-2012, 06:33 AM
  2. Netbeans (demo) "Unable to find a javac compiler
    By pottzie in forum New To Java
    Replies: 0
    Last Post: 10-25-2011, 11:52 PM
  3. netbeans can't find class in .jar file
    By emosms in forum New To Java
    Replies: 7
    Last Post: 05-08-2011, 08:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •