USB Drive Notifier - A PoC using Java and Powershell WMI Queries
Notifier notifier = new Notifier();
notifier.addListener(new USBDriveInfoListener() {
@Override
public void onEvent(USBDriveInfo info) {
System.out.println(info);
}
});
notifier.startListening();