Apparently Java may have been installed outside of
rpm package management.
In that case, you could just do a
mv /dir/java /dir/java.to-be-removed, then verify that nothing essential gets broken by this.
If all seems OK, then remove any references to
/dir/java/bin in system-wide
MANPATH settings (check
/etc/profile, and the files in
/etc/profile.d directory if it exists) , delete any system-wide
JAVA_HOME environment variable settings, and finally remove the
/dir/java.to-be-removed directory altogether.
You might also check that
/usr/local/bin directory doesn't contain any now-broken symbolic links pointing to the various tools within