Thanks for your response.
I know this should work.But if we don’t specify main-class in our build script,Do we have any plugin to search for main class & make the Jar executable.
I think in maven we have a spring-boot-maven-plugin will do that & am looking for similar plugin to do here.
This is a spring boot plugin for Gradle as well that has this capability. However, this is limited to Spring Boot projects. No such plugin exists for generic Java applications that I’m aware of. Perhaps an opportunity for contribution