The issue is likely where you have the Java tool installed. There is a difference of the Java runtime, what your browser uses and the Java Development Kit (JDK).It needs t be able to use java.exe usually in the JDK but can be elsewhere. In this bat file it is using
c:\jdk20
this can vary widely on your system. Try
a) remove all instances of c:\jdk20\bin\
and try again
b) install the latest JDK whereever you like, and edit c:\jdk20 to point to your new install
Lastly you do not technically need to compile , what is needed is
a) copy your detailsx.js into the Mods folder, eg copy details3.js into Mods/details3.js
b) merge all your .js files (except that one) for your mod into one file, so open one and append the others to it. Then save as compiled.js in the Mod folder eg
Mods/MyMod/compiled.js. Use any text editor or there is code in compile.bat you can extract to do it