JDK-4077850 : Executing subprocesses on NT does not quote its arguments
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.1.3
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1997-09-09
  • Updated: 1997-09-10
  • Resolved: 1997-09-10
Related Reports
Duplicate :  
The Runtime.exec methods on NT do not quote their arguments.  They simply concatenate them into a command string.  If an argument contains white space, it will be interpreted as two separate arguments by the spawned subprocess.

WORK AROUND There is no workaround for this. In JavaSafe, we implement a native call to spawn a subprocess.

SUGGESTED FIX We have example code in JavaSafe, if you'd like to look at how to do this in NT.