http://docs.oracle.com/javase/7/docs/api/java/io/File.html#listRoots()
File[] roots = File.listRoots();
for(int i = 0; i < roots.length ; i++)
System.out.println("Root["+i+"]:" + roots[i]);
google: list drives java, first hit:-)
More Related Contents:
- Can’t start Eclipse – Java was started but returned exit code=13
- Java maximum memory on Windows XP
- Java: run as administrator
- How can I convert a .jar to an .exe?
- Embed a JRE in a Windows executable?
- Run .exe file in Java from file location
- React on global hotkey in a Java program on Windows/Linux/Mac?
- How to open a Windows named pipe from Java?
- How to Execute Windows Commands Using Java – Change Network Settings
- How to get Windows username in Java?
- Detect if Java application was run as a Windows admin
- JAVA_HOME should point to a JDK not a JRE
- Using NTLM authentication in Java applications
- Maximum amount of memory per Java process on Windows?
- Accurate Sleep for Java on Windows
- How to get local application data folder in Java? [duplicate]
- Java, UTF-8, and Windows console
- “The filename or extension is too long error” using gradle
- In java under Windows, how do I find a redirected Desktop folder?
- java stack dump on windows
- How to get the remaining battery life in a Windows system?
- Is there a Java library to access the native Windows API?
- How to discover a File’s creation time with Java?
- How to get list of all window handles in Java (Using JNA)?
- How to Detect workstation/System Screen Lock/unlock in windows OS using java?
- Packaging Java apps for the Windows/Linux desktop
- Windows shutdown hook on java application run from a bat script
- Executing cmd.exe commands from Java
- How do I access Windows Event Viewer log data from Java
- Convert static windows library to dll