提交 f29a6d06 编写于 作者: L lancea

8006036: (process) cleanup code in java/lang/Runtime/exec/WinCommand.java

Reviewed-by: lancea
Contributed-by: NJim Gish <jim.gish@oracle.com>
上级 bf6cc094
/* /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2004, 2013 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -135,6 +135,7 @@ public class WinCommand { ...@@ -135,6 +135,7 @@ public class WinCommand {
// Win9x systems don't have a cmd.exe // Win9x systems don't have a cmd.exe
if (new File(systemDirW, "cmd.exe").exists()) { if (new File(systemDirW, "cmd.exe").exists()) {
try {
out.println("Running cmd.exe tests..."); out.println("Running cmd.exe tests...");
writeFile("cdcmd.cmd", "@echo off\r\nCD\r\n"); writeFile("cdcmd.cmd", "@echo off\r\nCD\r\n");
writeFile("cdbat.bat", "@echo off\r\nCD\r\n"); writeFile("cdbat.bat", "@echo off\r\nCD\r\n");
...@@ -148,6 +149,10 @@ public class WinCommand { ...@@ -148,6 +149,10 @@ public class WinCommand {
"/" + systemDirM + "/cmd", "/" + systemDirM + "/cmd",
"cdcmd.cmd", "./cdcmd.cmd", ".\\cdcmd.cmd", "cdcmd.cmd", "./cdcmd.cmd", ".\\cdcmd.cmd",
"cdbat.bat", "./cdbat.bat", ".\\cdbat.bat"); "cdbat.bat", "./cdbat.bat", ".\\cdbat.bat");
} finally {
new File("cdcmd.cmd").delete();
new File("cdbat.bat").delete();
}
} }
// 16-bit apps like command.com must have a console; // 16-bit apps like command.com must have a console;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册