A Java library to get a list of all usb storage devices connected to the computer. It works on the three main operating systems (Windows, Linux and OS X).
To include this library in your project just use:
<dependency>
<groupId>net.samuelcampos</groupId>
<artifactId>usbdrivedetector</artifactId>
<version>2.0.0</version>
</dependency>