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

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

    Am i understanding your question only? You need .bat file to compile and execute java class files?

    if its a .bat file. you can just double click.

    and in your .bat file, you just need to javac Main.java ((make sure your bat has the path to ur Main.java) java Main

    If you want to echo compilation warnings/statements, that would need something else. But since, you want that to be automated, maybe you eventually don't need that.

提交回复
热议问题