UsingFileSystemView.java Source code

Java tutorial

Introduction

Here is the source code for UsingFileSystemView.java

Source

import javax.swing.JFileChooser;
import javax.swing.filechooser.FileSystemView;

public class UsingFileSystemView {

    public static void main(String[] a) {

        JFileChooser chooser = new JFileChooser();

        FileSystemView view = chooser.getFileSystemView();

        System.out.println(view.getDefaultDirectory());

    }

}