problems with UsbHostManager.getUsbServices ();

0

hello I have problems with these lines of code

public static void main(String[] args) throws UsbException
{
    UsbServices services = UsbHostManager.getUsbServices();
    dump(services.getRootUsbHub(), 0);
}

and java just gives me this error

*Exception in thread "main" java.lang.NullPointerException
    at javax.usb.UsbHostManager.getServicesName(UsbHostManager.java:96)
    at javax.usb.UsbHostManager.initialize(UsbHostManager.java:32)
    at javax.usb.UsbHostManager.getUsbServices(UsbHostManager.java:24)
    at usb.DumpDeviceTree.main(DumpDeviceTree.java:3)*        
    
asked by Carlos Alberto Argote Quintero 14.11.2017 в 18:20
source

0 answers