title: NetBeans JMF project deployment
body: <p>I used JMF/Webcam Frame Grabber Demo to create java desktop application in NetBeans 7.0.1 EE that grabs frame from my webcam. Application works fine if I run it from NetBeans (Right click on project and Run), but if I run Netbeans generated .jar file from command prompt, It doesn't detect my device. </p>
  
  <pre><code>CaptureDeviceInfo device = CaptureDeviceManager.getDevice(cameraDevice);
  </code></pre>
  
  <p>device is null.</p>
  
  <p>The result is the same if I remove jmf.jar from project library and run it from there. It throws this exception:</p>
  
  <pre><code>Exception in thread "Thread-4" java.lang.NullPointerException
      at desktopapplication6.DesktopApplication6View$MyNetworkThread.run(DesktopApplication6View.java:248)
  </code></pre>
  
  <p>Netbeans creates dist and dist\lib folder with all the necessary lib jars. In the applications jar, Manifest.mf looks like this</p>
  
  <pre><code>Manifest-Version: 1.0
  Ant-Version: Apache Ant 1.8.2
  Created-By: 1.6.0_27-b07 (Sun Microsystems Inc.)
  Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/jm
   f.jar
  Main-Class: desktopapplication6.DesktopApplication6
  </code></pre>
  
  <p>I tried creating my own jar with changes in manifest, but no luck.</p>
  
  <p>I'm using Win 7 64bit, JDK 32bit v.1.6.0_27. (NetBeans use the same JDK), JMF installed after that (v.2.1.1e). </p>
  
  <pre><code>Classpath = %JMFHOME%\lib\jmf.jar;%JMFHOME%\lib\sound.jar;%JMFHOME%\lib
  Path = %JMFHOME%\lib
  JMFHOME = C:\Program Files (x86)\JMF2.1.1e
  </code></pre>
  
  <p>JMFRegistry detects my device (vfw:Microsoft WDM Image Capture (Win32):0). 
  So, does anyone know how to make this jar file that works and recognize my device?</p>