Compile and run Java with batch processing

Probably the simplest code in history?

I don't know why the batch code they wrote is so complicated...

Isn’t it essentially two commands?

javac %1
java %~n1
pause

Open the text document and save it as bat

Drag the Java file you want to compile and run directly onto this script

While outputting the results, the background generates machine code

 

Guess you like

Origin blog.csdn.net/weixin_43673589/article/details/109252869