Running the jar directly does not have a command-line window, if you want to have a command-line window, it is generally necessary to win+r run cmd, navigate to the directory, and then use the command line to execute Java-jar Xxx.jar
For Python, opening the py file is also a hassle, by default it loads the source code with idle, and then F5 runs, but there is another way, command line, to locate the directory, Python xxx.py
It's also a problem, but we can do it with a batch of bat.
Create a new TXT, the name is random, open, content copy the following
1 Echo Off :: Turn echo off, that is, the command line does not display return information 2 cd%~dp0:: Navigate to current directory 3CLS:: Clear Screen 4 :: Execute command 5 pause:: Run out of pause , rather than immediately exiting
Explain,
:: Line comment for BAT file
Line four to fill in the command
If the jar is running, then Java-jar Xxx.jar
If it is a py file, then Python xxx.py
can also be used to do a lot of other, digging for themselves
Open Java, jar, py file using bat one click