Few fixes to work with Centos 7

I have struggled with errors cause by those lines so I tought I would share as a pull request.
First one is about java when java executable is not in the path.
Second one is return code 4 when deleting non existing file with rm -Rf
I'd like to understand why this is necessary, there's already the `path` statements below in the `exec` resources, what's the error you've been seeing in CentOS 7 to require this