[英]How do I call a permanent command prompt?
In Windows, I made a small script to compile and then run a Java application: 在Windows中,我编写了一个小脚本来编译然后运行Java应用程序:
javac helloWorld.java
java helloWorld
helloWorld prints "Hello, world!" helloWorld打印“Hello,world!” and then the command prompt closes immediately. 然后命令提示符立即关闭。 What I want to happen is for the program to execute then have a new line on the command prompt ready to go. 我想要发生的是程序执行然后在命令提示符上有一个新行准备就绪。
EDIT: 1 more stipulation. 编辑:1更多规定。 It needs to be just one batch file, not a batch file calling another one. 它只需要一个批处理文件,而不是另一个批处理文件。
Append the line: 附加行:
cmd
...at the end of your batch file. ...在批处理文件的末尾。
你需要启动一个cmd.exe实例,让它运行。
You could start the script like this: 您可以像这样启动脚本:
cmd /K script.cmd
This will keep the cmd shell open. 这将使cmd shell保持打开状态。
You can accomplish this by creating a desktop shortcut with the given line. 您可以通过使用给定行创建桌面快捷方式来完成此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.