Creating a batch file, for simple javac and java command execution

前端 未结 11 2584
终归单人心
终归单人心 2021-02-15 14:18

It is a really simple thing but I cannot get my head around it. I have looked at plenty of StackOverFlow post and as well as on internet.

My goal is to create a .bat whi

11条回答
  •  一生所求
    2021-02-15 14:23

    1. Open Notepad

    2. Type in the following:

      javac *
      java Main
      
    3. SaveAs Main.bat or whatever name you wish to use for the batch file

    Make sure that Main.java is in the same folder along with your batch file

    Double Click on the batch file to run the Main.java file

提交回复
热议问题