hi
i have tried many example to work with web camera but exception said that no device connected

while camera fine and work under windwos

this is th code thank you for help

import javax.media.Player;
import javax.media.CaptureDeviceInfo;
import javax.media.MediaLocator;
import javax.media.CaptureDeviceManager;
import javax.media.Manager;
import javax.media.format.*;

import java.util.Vector;
import java.awt.*;

public class TestJMF4 {
CaptureDeviceInfo device;
MediaLocator ml;
Player player;
Component videoScreen;
public static void main(String args[]){
new TestJMF4();
}

TestJMF4(){
try
{ //gets a list of devices how support the given videoformat
Vector deviceList = CaptureDeviceManager.getDeviceList(new YUVFormat());


device = (CaptureDeviceInfo) deviceList.firstElement();



ml = device.getLocator();


player = Manager.createRealizedPlayer(ml);

player.start();

videoScreen = player.getVisualComponent();
Frame frm=new Frame();
frm.setBounds(10,10,300,300);

frm.add(videoScreen);
frm.setVisible(true);

}
catch(Exception e)
{
System.out.println(e);
}
}
}