updated scripts to ensure the service starts and java is present before