-
Bug
-
Resolution: Fixed
-
P3
-
8u40, 8u45, 9
-
Cygwin
-
b42
-
generic
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085542 | emb-9 | Unassigned | P3 | Resolved | Fixed | team |
JDK-8067621 | 8u45 | Sergey Lugovoy | P3 | Resolved | Fixed | b01 |
JDK-8065108 | 8u40 | Sergey Lugovoy | P3 | Resolved | Fixed | b17 |
JDK-8070527 | emb-8u47 | Sergey Lugovoy | P3 | Resolved | Fixed | team |
For reproduce, please, run this code on Cygwin
$ jjs -scripting test.js
Current dir : C:\cygwin64\home\sqe\work\8u40\nashorn
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "notepad" (in directory "\home\sqe\work\8u40\nashorn"): CreateProcess error=267, The directory name is invalid
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:391)
at jdk.nashorn.tools.Shell.apply(Shell.java:394)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:323)
at jdk.nashorn.tools.Shell.run(Shell.java:169)
at jdk.nashorn.tools.Shell.main(Shell.java:133)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
Caused by: java.io.IOException: Cannot run program "notepad" (in directory "\home\sqe\work\8u40\nashorn"): CreateProcess error=267, The directory name is invalid
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at jdk.nashorn.internal.runtime.ScriptingFunctions.exec(ScriptingFunctions.java:166)
at jdk.nashorn.internal.scripts.Script$test.:program(test.js:7)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
... 5 more
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:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 10 more
Code:
print("Current dir : " + java.lang.System.getProperty("user.dir"))
print("")
`notepad`
if I run command from ProcessBuilder, exception will not reproduce :
var pb = new java.lang.ProcessBuilder("notepad")
var p = pb.start()
p.waitFor()
$ jjs -scripting test.js
Current dir : C:\cygwin64\home\sqe\work\8u40\nashorn
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "notepad" (in directory "\home\sqe\work\8u40\nashorn"): CreateProcess error=267, The directory name is invalid
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:391)
at jdk.nashorn.tools.Shell.apply(Shell.java:394)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:323)
at jdk.nashorn.tools.Shell.run(Shell.java:169)
at jdk.nashorn.tools.Shell.main(Shell.java:133)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
Caused by: java.io.IOException: Cannot run program "notepad" (in directory "\home\sqe\work\8u40\nashorn"): CreateProcess error=267, The directory name is invalid
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at jdk.nashorn.internal.runtime.ScriptingFunctions.exec(ScriptingFunctions.java:166)
at jdk.nashorn.internal.scripts.Script$test.:program(test.js:7)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
... 5 more
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:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 10 more
Code:
print("Current dir : " + java.lang.System.getProperty("user.dir"))
print("")
`notepad`
if I run command from ProcessBuilder, exception will not reproduce :
var pb = new java.lang.ProcessBuilder("notepad")
var p = pb.start()
p.waitFor()
- backported by
-
JDK-8065108 Nashorn: RuntimeException when run command from js with -scripting on Cygwin
-
- Resolved
-
-
JDK-8067621 Nashorn: RuntimeException when run command from js with -scripting on Cygwin
-
- Resolved
-
-
JDK-8070527 Nashorn: RuntimeException when run command from js with -scripting on Cygwin
-
- Resolved
-
-
JDK-8085542 Nashorn: RuntimeException when run command from js with -scripting on Cygwin
-
- Resolved
-
- duplicates
-
JDK-8062157 [TESTBUG] Two nashorn tests fail when run with Cygwin blocking the rest of tests from running
-
- Closed
-