Paketo.io / CloudNativeBuildPack created Container image doesn't have curl installed - and this is for good reasons (see https://stackoverflow.com/a/65393843/4964553 & https://blog.sixeyed.com/docker-healthchecks-why-not-to-use-curl-or-iwr/).
So we need another aproach... As suggested we should use the container inherited language (here: Java/JDK) to write our own healthcheck.
So let's look at this great article https://mflash.dev/blog/2021/03/01/java-based-health-check-for-docker/ , where Naiyer explains how to write a simple healthcheck based on Java 11+
Here's my adoption leveraging an argument to provide a specific port. Just look into HealthCheck.java: