Hello everybody !
In my graduation project we need to read bits from a pic , as a first step of learning we build this java code and we have an error ,
could you please help me to run its correctly
java code :
import java.util.*;
import javax.usb.*;
/**
*
* @author tasneem
*/
public class USBListner {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws UsbException {
// TODO code application logic here
UsbServices services = UsbHostManager.getUsbServices();
UsbHub root = services.getRootUsbHub();
listDevices(root);
}
private static void listDevices(UsbHub hub) {
List devices = hub.getAttachedUsbDevices();
Iterator iterator = devices.iterator();
while(iterator.hasNext()){
UsbDevice device = (UsbDevice)iterator.next();
System.out.print(device);
if(device.isUsbHub())
listDevices((UsbHub)device);
}}
}
java error : in attachments i have added a snapshot
Thank you
