Aren\'t there any system calls or OS specific functions that can be called by Java to get just the names of the USB devices attached?
I\'ve seen probably 6-7 questio
You can use the jUsb
API, for Linux.
Or you could launch the terminal
in Linux using the Process
class, and run
ls -la /dev/disk/by-id/usb-*
and catch the stdout
to know the results.
For Windows, you can try this : How to find my USB flash drive's path with PowerShell
EDIT:
For Windows, another helpful utility is the devcon.exe
.
For more info, check this.
EDIT 2:
For Mac, you could launch the terminal
using the Process
class, and run system_profiler SPUSBDataType