title: Netbeans Platform Application doesnt detect webcam devices with JMF
body: <p>I've been trying to develop an application with Netbeans RCP to grab images from a webcam.
  Plain and simple, it works in a regular Java project.</p>
  
  <p>So first of all the JMF must be installed (I'm on Windows 7 64bit, (32bit JDK which is needed for JMF).</p>
  
  <p>In a regular Java project I have the following code:</p>
  
  <pre><code>Vector webcams = CaptureDeviceManager.getDeviceList(null);
  int length = webcams.size();
  System.out.println("length: " +length); 
  </code></pre>
  
  <p>The output for this is "length: 1" (1 webcam connected)</p>
  
  <p>When I do this in my Netbeans platform project this output is "length: 0".</p>
  
  <p>So basicly I have my Netbeans project suite
  2 modules:</p>
  
  <ul>
  <li>JMF libraries (wrapper module with jmf.jar)</li>
  <li>Webcam module (contains 1 java file with the above code)</li>
  </ul>
  
  <p>I added the JMF libraries module to the Webcam module as a Dependency but this didn't do the trick.
  I can also confirm that the classpath is set:</p>
  
  <pre><code>Boot &amp; Ext. Classpath   = C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\rt.jar;
  C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\jsse.jar;
  C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\modules\jdk.boot.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\classes;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\dnsns.jar;**C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\jmf.ja**r;
  C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\sound.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\sunjce_provider.jar;
  C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\sunmscapi.jar;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\lib\ext\sunpkcs11.jar
  </code></pre>
  
  <p>I am really stuck here.  What is so special about Netbeans RCP that adding jmf.jar as a wrapper module seems to break this code?</p>
  
  <p>If someone has some tips to help get more debug information to trace the problem I'm very grateful.</p>
  
  <p>EDIT:</p>
  
  <p>After a lot of trial and error I found the following solution:</p>
  
  <pre><code>Copy c:\Progra.... x86\JMF...\lib\* to c:\Program .. x86\jdk\lib\*
  Including the jmf.properties file
  </code></pre>
  
  <p>However I am happy that this works, once the app transfer to another client PC for usage it will not have those libs there.</p>
  
  <p>So I really don't know how to solve this problem with Netbeans RCP.  How hard can it be? I added the jars to the wrapper, I placed the .properties file in the /release/modules/ext folder as well.</p>
  
  <p>Please help me out here :)</p>