Note that although this is just a simple question, I have been exploring this cainiao for a long time ~~
Double-click to open a jar with no interfaceProgramAnd want to stay in the CMD window. Let's take a look at the system. Out. Print Information displayed by the jar program. Write a bat:
Java-jar test. Jar
Pause
For the above two lines.
The first line of text, needless to say.
The key is the second line, pause ~~
In the first line, everyone will. I tried it for a long time, but I was depressed and the window didn't show up. However, in the task manager, a javaw is still found, that is, the jar program is running.
In order to let the window stay, I tried again. I first opened the window with cmd and then executed the following command. However, I found that if the first line in bat is cmd, the latter will not be executed ~~ I don't know why
I think the CMD window will not disappear without executing the last bat command, so I tried to add a pause ~~~
Ha, very effective ~~