While I didn't see it in your question, I presume you are very familiar with File.listRoots() method which returns an array of well, file roots.
Then, you could just iterate over them, and try to identify if they are flash drives. Some hacks may be like:
File[] roots = File.listRoots();
if (roots == null) {
// you have a different problem here. Is it even a computer we are talking about?
}
// Iterate through roots
for (File root : roots) {
if (root.canWrite()) { // Or, you could use File.createTempfile with that folder
// if root does not contain some well know files
// Or, if root contains some well known files
// Based on these 2 hacks, or possible other characteristics, you may be reasonably sure
}
}
That's all I can offer. A lot more can be done with more native programs, and then invoking them from the Java program.