just get the names of USB devices attached to a system?

后端 未结 3 1898
广开言路
广开言路 2020-12-19 09:10

Aren\'t there any system calls or OS specific functions that can be called by Java to get just the names of the USB devices attached?

I\'ve seen probably 6-7 questio

3条回答
  •  猫巷女王i
    2020-12-19 09:28

    Maybe things have improved since you first asked this question. I recently began exploring usb4java on the Mac, and it seems to work. There is example code available, both for the low-level (libusb-like) API, and the high-level (javax) API.

    To list all USB-devices, look the examples.

    I downloaded all libraries directly from usb4java.org and the examples from github. I did not manage to get the maven build working, but I could import the libraries and examples in Eclipse and run them all.

    There are same native code included in usb4java, but the library wraps them all quite beautifully and hides all the messy details, only extracting and deploying the native code at demand.

提交回复
热议问题