I want to make file.bat that should run my jar only when user press enter. Bat must run and does't execute anything without user press enter. In cmd should be printed:
java -jar crawler-1.0.jar
A part from that user could change this.text
How can I do this?
Try this:
That way, the program will start only if the user hits enter (and not any other key). Also, the window should remain to show the output from the program.
You can always just echo the command, then pause before running the command, not perfect, but it works:
I can't comment, so answer to comment question is here:
Excuse me. I think that the real goal of this question is: "How to prefill the cmd.exe command-line input with an editable string", so the user may just press Enter key to execute the prefilled input, or edit it in any desired way. I copied the method below from this post: