Help for installing libusbjava

edited August 2018 in Library Questions

Hi everyone, I'm currently trying to use libusbjava as shown on this website, but I get an error, and can't manage to get it to work, since I'm not so experienced with raw Java... The thing is this example was made in 2009, and the library seems to have changed since that... when clicking "play", I get this error : "A library used by this sketch is not installed properly." and "A library relies on native code that's not available. Or only works properly when the sketch is run as a 32-bit application."

Here's my code for now :

import ch.ntb.inf.libusb.*;
import ch.ntb.inf.libusb.exceptions.*;
import ch.ntb.inf.libusb.test.*;

Context ctx;
Device dev;

void setup()
{
  noLoop();
}


void draw()
{

  println("Search Device:");
  try
  {
    ctx = new Context();
  }
  catch (LibusbException e) 
  {
    println("Error occured: ctx");
    e.printStackTrace();
  }
  try 
  {
    Device dev = Device.search(ctx, 0x0000, 0x0000);                         
  }
 catch (LibusbException e) 
 {

   println("Error occured: search");
   e.printStackTrace();
 }

}

Hope someone will be able to help me ! Thanks forward !

Tagged:

Answers

Sign In or Register to comment.