title: usb4Java USB error 3: Unable to open USB device: Access denied (insufficient permissions)
body: <p>I'm using Windows 10 and Java through Eclipse. I'm pretty new to programming and have been working on a project that requires reading in data from a USB Device.</p>
  <p>When I run the LibUsb.open(device, Handle) I receive the following error: USB error 3: Unable to open USB device: Access denied (insufficient permissions)</p>
  <p>I've already run the zadig program to fix some other errors, but I can't seem to get around this one. Hoping someone could help me?</p>
  <p>My Code is below (The FindDevice works fine, it's just when result = LibUsb.open(device, handle) is run the result = USB error 3: Unable to open USB device: Access denied (insufficient permissions)</p>
  <p>I haven't been able to find much help on this on google.</p>
  <pre class="lang-java prettyprint-override"><code>public void actionPerformed(ActionEvent arg0) {
  
      //Initialize the libusb
      context = new Context();
      int result = LibUsb.init(context);
      if (result != LibUsb.SUCCESS) {
          throw new LibUsbException(&quot;Unable to initialize libusb.&quot;, result);
      }
      //Find the Device on the System
      short vendorId = (short)1545;
      short productId = (short)797;
      Device device = findDevice(vendorId,productId);
      DeviceHandle handle = new DeviceHandle();
      //Create the DeviceHandle
      //Open the Test Device  
  
      result = LibUsb.open(device, handle);
      if (result != LibUsb.SUCCESS) {
          throw new LibUsbException(&quot;Unable to open USB device&quot;, result);
      }
      try
      {
          // Use device handle here
          System.out.println(&quot;Does this happen?&quot;);
          //claimDevice(vendorId, productId);
      }
      finally
      {
          LibUsb.close(handle);
      }           
  
      LibUsb.exit(context);
  }
  
  public Device findDevice(short vendorId, short productId) {
  
      // Read the USB device list
      DeviceList list = new DeviceList();
      int result = LibUsb.getDeviceList(null, list);
      if (result &lt; 0) throw new LibUsbException(&quot;Unable to get device list&quot;, result);
  
      try
      {
          // Iterate over all devices and scan for the right one
          for (Device device: list)
          {
              DeviceDescriptor descriptor = new DeviceDescriptor();
              result = LibUsb.getDeviceDescriptor(device, descriptor);
              if (result != LibUsb.SUCCESS) throw new LibUsbException(&quot;Unable to read device descriptor&quot;, result);
  
              //Below is only executed when trying to figure out the Vendor ID and Descripter ID.
              //System.out.println(&quot;VendorID:&quot; + descriptor.idVendor());
              //System.out.println(&quot;Descripter ID:&quot; + descriptor.idProduct());
  
              if (descriptor.idVendor() == vendorId &amp;&amp; descriptor.idProduct() == productId) {
                  System.out.println(&quot;Found Device!&quot;);
                  return device;
              }
          }
      }
      finally
      {
          // Ensure the allocated device list is freed
      }
  
      // Device not found
      return null;
  }
  </code></pre>