For Kogito java images, memory-limit.sh script is there to limit memory usage for Graal VM native builds, so it should be executed only for native builds and excluded for non-native builds.
And this is directly impacting Kogito java J9 images for z/p since GraalVM natives are not supported.