fixed init script and added ability to configure java heap size