Acquiring drive names (as opposed to drive letters) in Java

Posted by Mattijs on Stack Overflow See other posts from Stack Overflow or by Mattijs
Published on 2009-01-20T16:48:56Z Indexed on 2010/06/03 2:04 UTC
Read the original article Hit count: 219

Filed under:
|
|
|

Hi,

On my Windows machine, my main hard drive has the letter C: and the name "Local disk".

To list the drive letters in Java on Windows, the File object has the static listRoots() method. But I can't find a way to acquire the drive names (as opposed to the drive letters) on Windows.

Has anyone tried this before?

Thanks, Mattijs

© Stack Overflow or respective owner

Related posts about java

Related posts about Windows