title: Running NiTE and OpenNI on Java - Handviewer Java Sample Crashes
body: <p>I am trying to get the Handviewer java sample project running. When running the application crashes after (1-2 sec) and firing the following exceptions!</p>
  
  <p>Please note that I have managed to run the UserViewers.java sample without problems. and I am running on OSX 10.8.3, NiTE-MacOSX-x64-2.2, OpenNI-MacOSX-x64-2.2, and Asus XtionPro Live.</p>
  
  <pre><code>Exception in thread "Thread-17" java.util.NoSuchElementException: Unknown pixel format: 0
      at org.openni.PixelFormat.fromNative(PixelFormat.java:30)
      at org.openni.VideoMode.&lt;init&gt;(VideoMode.java:38)
      at com.primesense.nite.NativeMethods.niteReadHandTrackerFrame(Native Method)
      at com.primesense.nite.HandTracker.readFrame(HandTracker.java:139)
      at com.primesense.nite.Samples.HandViewer.HandViewer.onNewFrame(HandViewer.java:69)
      at com.primesense.nite.HandTracker.onFrameReady(HandTracker.java:360)
  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at com.primesense.nite.Samples.HandViewer.HandViewer.paint(HandViewer.java:55)
      at javax.swing.JComponent.paintChildren(JComponent.java:884)
      at javax.swing.JComponent.paint(JComponent.java:1046)
      at javax.swing.JComponent._paintImmediately(JComponent.java:5106)
      at javax.swing.JComponent.paintImmediately(JComponent.java:4890)
      at javax.swing.RepaintManager$3.run(RepaintManager.java:814)
      at javax.swing.RepaintManager$3.run(RepaintManager.java:802)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:802)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:745)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:725)
      at javax.swing.RepaintManager.access$1000(RepaintManager.java:46)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1684)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708)
      at java.awt.EventQueue.access$400(EventQueue.java:82)
      at java.awt.EventQueue$2.run(EventQueue.java:669)
      at java.awt.EventQueue$2.run(EventQueue.java:667)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:678)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
  </code></pre>