How do I call a permanent command prompt?
In Windows, I made a small script to compile and then run a Java application:
javac helloWorld.java
java helloWorld
helloWorld prints "Hello, world!" and then the command prompt closes immediately. What I want to happen is for the program to execute then have a new l开发者_StackOverflowine on the command prompt ready to go.
EDIT: 1 more stipulation. 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.
you need to start an instance of cmd.exe and just let it run.
You could start the script like this:
cmd /K script.cmd
This will keep the cmd shell open.
You can accomplish this by creating a desktop shortcut with the given line.
精彩评论