make the build and run scripts for javaTool better