If you are having trouble changing the text file to a batch file, you may need to turn on "show all file extensions" in "folder and search options."
If you get an error that Java is not recognized as an internal or external command, try reinstalling the Java JRE. If that doesn't work, find where "java.exe" is located on your harddrive and replace "java" in the script with the full address of that file.