title: Java and HID Communication
body: <p>I'm looking to write a Linux/Windows/Mac Java HID controller for a simple wireless HID interface device. I've tinkered around with the USB4Java LibUsb library to no avail, and I've been steered in the direction of the JavaHIDAPI.</p>
  
  <p>Unfortunately for me, I really have no idea what I'm doing beyond a pretty decent higher level programming skill set (C#/VB.Net), and switching over to this is killing me.</p>
  
  <p>The <a href="https://code.google.com/p/javahidapi/wiki/ReadMe" rel="nofollow">directions</a> that I found said that I would first need to compile the HIDAPI library found <a href="https://github.com/signal11/hidapi/tree/master/windows" rel="nofollow">here</a>. It said it would build something called hidapi-jni.dll (which it didn't).</p>
  
  <p>Anyway, I think this is where I need to go since the HID does nothing but simply sends and receives signals to and from a wireless control (and responds to signals received).</p>
  
  <p>Is there any step-by-step tutorial for using the JavaHIDAPI for this? Or is there a better library? (I noticed that this is a bit... dated).</p>
  
  <p>I tried myself with the following:</p>
  
  <pre><code>static{ System.loadLibrary("hidapi"); }
  .
  .
  .
  public static void main(string[] Args) throws . . . {    
      ClassPathLibraryLoader.loadNativeHIDLibrary();
      HIDDevice dev = HIDManager.getInstance().openById(VEND_ID, PROD_ID, null);
      .
      .
      .
  }
  </code></pre>
  
  <p>The issue into which I am running is that (besides the fact that the HIDAPI doesnt seem to be building into HIDAPI-jni.dll) is that the HIDManager.openById(. . .) always returns null. Also, I moved the hidapi.dll that was built into the C:...\Java...\bin directory... or something, I'm sure it's right because there wasn't any unsatisfied link error. It's really frustrating because there doesn't seem to be any newbies guide to Java and HID anywhere.</p>
  
  <p>What am I doing wrong here?</p>