简体   繁体   English

如何调用永久命令提示符?

[英]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.

相关问题 如何使RMI注册表在Windows命令提示符下工作? - How do I get rmi registry to work on windows command prompt? 如何通过控制台(命令提示符)运行 java 程序? - How do I run a java program through the console (command prompt)? 我如何发现永久世代中的东西 - How do I discover what is in the permanent generation 如何在Windows命令提示符下增加命令行参数的大小或限制 - How do I increase command line argument size or limit in windows command prompt 如何在 Java 中写入命令提示符? - How do you write to a command prompt in Java? 如何向Java添加库? 我不使用任何IDE,仅使用命令提示符 - How do I add a library to java? I dont use any IDE, I use only the command prompt 在命令提示符下运行jar文件时,如何获取用户输入? - How do I get user input when I run my jar file from command prompt? 如何使表格单元格编辑中的更改永久生效? - How do I make the changes from table cell editing permanent? 我如何输入从批处理文件,Java应用程序运行的命令提示符 - How do I input into a command prompt, that's ran from a batch file, from a java application 如何通过 Windows 命令提示符使用 Java Keytool 指定现有 SSL 证书的文件路径? - How do I specific a file path to an existing SSL certificate using Java Keytool via Windows Command Prompt?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM