javax.usb.UsbException: Properties file javax.usb.properties not found

后端 未结 1 1724
情书的邮戳
情书的邮戳 2020-12-11 11:39

I used the following code to get the manufacturerCode of the usb device attached to the system. I added the jsr80-1.0.1 jar. And I got the following error javax.usb.UsbExcep

相关标签:
1条回答
  • 2020-12-11 12:07

    You need this file on your classpath. From the docs:

    The javax.usb.properties file is a Java properties file that is required by the API implementation loader class. The properties file must be loadable by normal means (i.e. it must be in the CLASSPATH) and it must contain the property javax.usb.services. This property must be defined. Its value must be the fully qualified class name of a class that implements the interface javax.usb.UsbServices. This class will be loaded as the implementation of javax.usb.

    And further, if you are seeing this error, you presumably haven't got a javax.usb implementation:

    You need a javax.usb implementation; the file is provided by all javax.usb implementations

    See here: http://javax-usb.sourceforge.net/faq.html#what_is_properties_file

    0 讨论(0)
提交回复
热议问题