The $IGW_LOC/igateway.conf contains references to $EIAM_HOME/jre or jre18 directories. Confirm which one is listed within the file before removing any directories. If needed, adjust the references from jre to jre18 in the igateway.conf file and restart igateway before deleting the older jre directory.
NOTE - The EEM documentation for eiam-clustersetup.jar shows an example that uses the jre directory. Both jre and jre18 will work.