Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6649663

JFileChooser is unable to show long file names

    XMLWordPrintable

    Details

      Description

      OPERATING SYSTEM(S):
      --------------------
      Windows XP

      FULL JDK VERSION(S):
      -------------------
      java version "1.6.0_04"
      Java(TM) SE Runtime Environment (build 1.6.0_04-b07)
      Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)

      DESCRIPTION:
      ------------

      JFilechooser is not showing the file name correctly if it's path length is more than 255. Instead, it is showing as "ShellFolder" in Java L&F and Motif L&F. Problem is not seen with Native L&F.

      Reproduction Instructions:

      1. Run the following java program to create folders with longer names.

      import java.io.File;
      import java.io.IOException;

      public class createFile {
      public static void main(String args[]) throws IOException{
      File f = new File("C:\\tmp\\1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890\\1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890");

      System.out.println(f.mkdirs());
      }
      }


      2. Run SwingSet2.jar
      3. Go to "FileChooser" demo.
      4. Click on "Show Plain JFileChooser"
      5. Select "C" drive & then select "tmp" then select the folder with
         long name created by above program
      6. Double click the above folder to open it.

      Observed result:
      Folder present inside the above said folder will be displayed as "ShellFolder".

      Expected result:
      Instead of "ShellFolder", its original name should be displayed (i.e 1234... etc.) as it is being displayed in Native L&F.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              loneid Leonid Popov (Inactive)
              Reporter:
              elarsen Erik Larsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: