If you wonder how to get the root directory of any current file system in java below code snippet can help.

The method listRoots() from class File returns an Array of type File, which can for example be used in a FileTreeModel.

TreeModel fileModel = new FileTreeModel(File.listRoots()[0]);

How to use a TreeModel in order to display a file systems directory structure in a JTree is explained in below article.

 FileTreeModel - TreeModel to display file system directories and files