I'm building a cross-platform Java program, and I need it to be able to recognize when a USB device is connected or disconnected. I don't need to do anything with the device, I just need to know if/when it happens. I've looked at jUSB, but that's Windows-only and unnecessarily big. Is there any simple way to do this?

有帮助吗?

解决方案

To the best of my knowledge information and belief, the answer is that there is no simple way to do that. Fundamentally, the Java Virtual Machine (JVM) is an abstraction from your real hardware (not to mention that Java predates USB).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top