fixed bugs in scripts for java jobs