i am new for java. I need help to detect the USB event whenever user will plug-in to USB port.This should be worked out for linux O.S. using java.Please suggest me api which can full fill my requirements
thanks in advance :)
i am new for java. I need help to detect the USB event whenever user will plug-in to USB port.This should be worked out for linux O.S. using java.Please suggest me api which can full fill my requirements
thanks in advance :)
You can use this:
Check this discussion also:
SWT: Getting notified of a system device change (USB device connection / disconnection)
Edit1. Bare in mind that jusb is discontinued. However, it's complete source code is available on sf.
Java 7.0 introduced the new API WatchService. Combined with the linux-command 'mount', i've found a working solution.
See http://arjenmaxnet.blogspot.nl/2014/01/detecting-usb-devices-with-java-70.html