Hmm, of course there is...batch files are essentially pre-defined lists of commands...with a few extras.
Since there are spaces in the path/name, just surround it with quotes, eg:
test.bat:
"C:\Program Files\Java\jdk1.6.0_01\bin\javac" %1
using it:
test.bat MyFile.java
That would call the javac executable and use the first command line argument. More then you asked, I know, but...pretty much anything can be enclosed by double quotes, and should be when there's whitespace involved.
Woot off to class.