Autodetect JAVA_HOME on RPM-based systems

you are absolutely correct! i've restructured the request and tested by giving a bogus name for the rpm command