当前位置:  开发笔记 > 开发工具 > 正文

cmd/C是什么意思?

如何解决《cmd/C是什么意思?》经验,为你挑选了3个好方法。

我能理解cmd但不能理解cmd /c.我试图从我使用的当前调用java程序Runtime.getRuntime().exec("cmd /C java helloworld");出现我怀疑.



1> guyumu..:

您应该感兴趣的/?部分是该部分,它应该解决您使用该工具的大多数其他问题.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>cmd /?
Starts a new instance of the Windows XP command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
        Unicode
/T:fg   Sets the foreground/background colors (see COLOR /? for more info)
/E:ON   Enable command extensions (see below)
/E:OFF  Disable command extensions (see below)
/F:ON   Enable file and directory name completion characters (see below)
/F:OFF  Disable file and directory name completion characters (see below)
/V:ON   Enable delayed environment variable expansion using ! as the
        delimiter. For example, /V:ON would allow !var! to expand the
        variable var at execution time.  The var syntax expands variables
        at input time, which is quite a different thing when inside of a FOR
        loop.
/V:OFF  Disable delayed environment expansion.


输出后还有一个"暂停"cmd窗口的命令:"cmd/c file_name&PAUSE"它与cmd/k有点不同

2> Simon Temlet..:

/C 执行字符串指定的命令,然后终止.

您可以通过键入来获取所有cmd命令行开关cmd /?.


但是为什么要呢?为什么不直接调用命令,例如“ java helloworld”

3> Andrea Ambu..:
CMD.exe

Start a new CMD shell

Syntax
      CMD [charset] [options] [My_Command] 

Options       

**/C     Carries out My_Command and then
terminates**

从帮助.

推荐阅读
谢谢巷议
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有