You can also set the PATH variable by following way
Settings--> Control Panel -->System -->Advanced -->Environment Variables
-->System Variables -->Path -->Edit-->Add the path to java BIN directory
also along with the previous content.
By doing this you need not run the batch file or set PATH everytime you run
java program.