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

前端 未结 11 2578
终归单人心
终归单人心 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:25

    1. open notepad

    2. write

      @echo off
      
      javac Main.java
      
      java Main
      

    3.saveAs blahblah.bat

    make sure that Main.java resides with your batch file and java path is set in env. variable

    4 . double click on batch file, no need to open cmd explicitly tt will open itself on .bat execution

提交回复
热议问题