Java command to create bat file to run an executable jar package

  Create a txt file in the same folder as the executable jar package (must be in the same folder directory), open the txt file you created and saved, enter the following:

off Is echo 
from java jar bao ming .jar 
pause in the

  As shown below:

  Then double-click the bat instead suffix txt can be run (run jar package simple document content directly written "java -jar + jar package name" to the extra content is to run the command window does not disappear completely, if you flash back shortcuts "win + R" cmd input path is switched to the path to the jar where the packet is then input * .bat), as shown below:

  Note:

  The project labeled jar package executable method: https://www.cnblogs.com/Big-Boss/p/11328256.html

Guess you like

Origin www.cnblogs.com/Big-Boss/p/11328723.html