Shell script for JavaTest

JavaTest.bat does not run on unix. This commit fixes that by porting JavaTest.bat to shell.