JDK-4306208 : Very long file name with Chinese character can not be listed by File.list()
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-01-21
  • Updated: 2005-10-04
  • Resolved: 2005-10-04
Related Reports
Duplicate :  
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