This should help you with the mechanics, you may have to provide the details:
@echo off
javac %1.java
if not errorlevel 1 java %1.class
at commond line i type jrun javafile.java
Change that to
jrun javafile and let the batch file determine the file extensions.
Check your path, if the java install did not add itself to your path, then a suggestion would be to login to the directory where your source code resides and use a path pointer to java directories. This will keep your source libraries and the java libraries separate.
@echo off
cd C:\YourSourceDirectory
C:\Program Files\Java\jdk1.6.0_02\bin\javac %1.java
if not errorlevel 1 C:\Program Files\Java\jdk1.6.0_02\bin\java %1.class
You will have to test this to make sure java can find all it's components.