• Post Reply Bookmark Topic Watch Topic
  • New Topic

Determining Fixed drives  RSS feed

 
Lance Walker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I was wondering if there was a way I could determine whether a drive is fixed or otherwise without using external libraries or JNI (I can never seem to get JNI to function correctly). I have tried using WinPack for JNIWrapper but have had trouble getting it to perform consistently. This is a simple method which will currently return an arraylist with every root drive, but doesn't filter out anything. Additionally Is there a way I can identify removable disks/CD/DVD drives so that I can assign them appropriate icons in my application?

 
Rob Spoor
Sheriff
Posts: 20897
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt this will be possible with pure Java, as the notion of a fixed drive is Windows only. In Unix, everything is simply a path.

javax.swing.filechooser.FileSystemView can help you out though:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!