开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜