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

Very long file name with Chinese character can not be listed by File.list()

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      On Windows NT, we can create long name file with File.createNewFile().
      There are limitation for the File.createNewFile(), for english characters, the maximum file is 255, for the Chinese character, the maximum is 127.

      We can mannually create a file named with Chinese characters that exceeds 127 (for example, 200 characters) Those files can be operated by OS but can not be seen by File.list().
      On the other hand, the file with a 200 character long file can be seen by File.list().

      To reproduce, run the attatchment:
      1. javac DirTool.java
      2. java DirTool (This will list all file in current dir)
      3. create a file with a very long file name(exceeds 127, use Chinese character)
      4. Press refresh button, you can not see the file you just created in TextArea
      5. If you interest, press Create button, this will show you the limitations of File.createNewFile()

      This happens in FCS-RC1(Build S)

      Kevin.Huang@prc 2000-1-20

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sherman Xueming Shen
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: