The only other thing I would add is to make it a tad more flexible. Most times I'll have a trivial java file I want to run like - Main.java, Simple.java, Example.java, or Playground.java (you get the idea).
I use the following to strike off a javac and corresponding java.
@echo off
javac %~n1.java
java %~n1
The %~n1 gets the filename (sans extension) of the first argument passed to the batch file. So this way I can run it using tab completion and not have to worry about it working with either the .class or .java extension.
So both of the following will have the same result:
run.bat Main.class
and
run.bat Main.java
Doesn't 100% answer the original posters question, but I think it is a good next step/evolution for simple javac/java programs.