I\'m trying to find a way to detect when a flash drive has been plugged into my computer. So far, the solution I found was to poll FileSystem#getFileStores for changes. This
I've not really explored this area of java, but I found this, which seems to be related. It uses File.listRoots()
File.listRoots()
There also seems to be a number of related questions linked there too.