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
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.