开发者

how can I detect and display all hardwares of a computer using java program?

开发者 https://www.devze.com 2023-02-01 15:20 出处:网络
Is there any way to detect hardwares plugged to a computer using java?For example,The program will be able to detect if a usb mouse is connected immidiately and show a message that an usb mouse is con

Is there any way to detect hardwares plugged to a computer using java?For example,The program will be able to detect if a usb mouse is connected immidiately and show a message that an usb mouse is conne开发者_Go百科cted.


it is not possible with pure java. but you can use a native lib available on all important platforms, e.g. SIGAR lib from hyperic hq


This depends very much on the plattform your programm is running on.

in linux you can use the dbus api to register hardware changes

if you are only interestet in usb devices you should have a look at jusb (afaik there is even a windows port)

0

精彩评论

暂无评论...
验证码 换一张
取 消