Command line cmd/C是什么意思?

Command line cmd/C是什么意思?,command-line,cmd,Command Line,Cmd,我能理解cmd,但不能理解cmd/c。我试图从当前使用的Runtime.getRuntime().exec(“cmd/cJavaHelloWorld”)调用一个java程序这引起了我的怀疑。/C执行字符串指定的命令,然后终止 您可以通过键入cmd/?获得所有cmd命令行开关 CMD.exe Start a new CMD shell Syntax CMD [charset] [options] [My_Command] Options **/C Car

我能理解
cmd
,但不能理解
cmd/c
。我试图从当前使用的
Runtime.getRuntime().exec(“cmd/cJavaHelloWorld”)调用一个java程序
这引起了我的怀疑。

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

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

CMD.exe

Start a new CMD shell

Syntax
      CMD [charset] [options] [My_Command] 

Options       

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

从帮助中。

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

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. Microsoft Windows XP[版本5.1.2600] (C) 版权所有1985-2001微软公司。 C:\>cmd/? 启动Windows XP命令解释器的新实例 CMD[/A |/U][/Q][/D][/E:ON |/E:OFF][/F:ON |/F:OFF][/V:ON |/V:OFF] [S][/C|/K]字符串] /C执行字符串指定的命令,然后终止 /K执行由字符串指定的命令,但保持不变 /S修改/C或/K之后字符串的处理方式(见下文) /Q关闭回声 /D禁用从注册表执行自动运行命令(见下文) /A使管道或文件的内部命令输出为ANSI /U会导致将内部命令输出到管道或文件 统一码 /T:fg设置前景色/背景色(有关详细信息,请参阅COLOR/?) /E:启用命令扩展(见下文) /E:关闭禁用命令扩展(见下文) /F:启用文件名和目录名完成字符(见下文) /F:禁用文件名和目录名完成字符(见下文) /V:ON使用启用延迟环境变量扩展!作为 定界符。例如,/V:ON将允许!瓦尔!扩大 执行时的变量var。var语法扩展变量 在输入时,这是一件完全不同的事情,当在FOR的内部时 环 /V:关闭禁用延迟环境扩展。
还有一个命令在输出后“暂停”cmd窗口:“cmd/c file\u name&pause”它与cmd/kw有点不同,如果给定的命令是一个启动自己循环的服务器?我们应该使用/C还是/K?当通过“进程”在C#中执行命令时,在Windows 7或Windows Server 2008 R2操作系统中使用/C是必须的吗?我来这里是因为它的行为与所描述的不一样。Im从git bash和cmd/c“dir”运行,或者任何命令只会在cmd提示符中留下我,而不执行ocmmand.cmd/?|更多…要将命令切换页面转到版主,是否有将其移动到堆栈溢出的相应门户/子公司的规定。这样,该项目将不会关闭,用户将能够贡献更多?我想这应该是类似于超级用户的东西?但为什么要这样呢?为什么不直接调用命令,比如“javahelloworld”,因为您可能不在CMD中,但您只想使用CMD为您执行命令。例如,我正在运行一个bash脚本,希望它执行cmd可以执行但bash不能执行的命令。