2 Replies Latest reply on Aug 2, 2012 8:15 AM by Jörg

    FileSystemView, Localized TypeDescription


      the following code lists a computer's drives
      import java.io.*;
      import javax.swing.filechooser.*;
      public class Drives {
        public static void main(String[] args) {
          File[] files = File.listRoots();
          FileSystemView fsv = FileSystemView.getFileSystemView();
          for (int i = 0; i < files.length; i++)
            System.out.println(fsv.getSystemTypeDescription(files)+" "+files[i]);
      The drive types are returned in the language of the OS.
      So the simple question/request is:
      Would someone running an English or French OS be so kind and run the programme and note down the different drive types for me.
      The more difficult question: How does java retrieve these localized drive names, respectively where can they be found?