JDK-6927419 : Runtime.exec throws IOException when directory parameter contains GB18030 char
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-02-17
  • Updated: 2010-04-02
  • Resolved: 2010-02-17
Related Reports
Duplicate :  
Description
ENVIRONMENT:
Windows

SUN JDK VERSION:
Recreated with 1.6.0_18


STEPS To Recreate:
-create a directory named NewFolder? in the current directory.
--javac HelloWorld.java
--javac ExecGB18030.java
--java  ExecGB18030

                                            
Observed output:
$ java ExecGB18030
Running command 'java HelloWorld' in dir './NewFolder???'
java.io.IOException: Cannot run program "java" (in directory ".\NewFolder???"):
CreateProcess error=267, The directory name is invalid
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
        at java.lang.Runtime.exec(Runtime.java:593)
        at java.lang.Runtime.exec(Runtime.java:431)
        at ExecGB18030.main(ExecGB18030.java:14)
Caused by: java.io.IOException: CreateProcess error=267, The directory name is invalid
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
        ... 3 more
>>> FATAL

Expected output:
Running command 'java HelloWorld' in dir './NewFolder?'
>>> SUCCESS