简体   繁体   中英

Cross-Platform way to listen for USB connections?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM