'Quarkus native exception : java.lang.RuntimeException: Cannot find the `native-image.cmd` in the GRAALVM_HOME

Getting this error while trying to build natively. The issue here is native-image.cmd is not present in the bin folder. I have also verified it in different versions as well.

> Failed to execute goal
> io.quarkus.platform:quarkus-maven-plugin:2.7.4.Final:build (default)
> on project code-with-quarkus: Failed to build quarkus application:
> io.quarkus.builder.BuildException: Build failure: Build failed due to
> errors [ERROR]         [error]: Build step
> io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an
> exception: java.lang.RuntimeException: Cannot find the
> `native-image.cmd` in the GRAALVM_HOME, JAVA_HOME and System PATH.
> Install it using `gu install native-image` [ERROR]         at
> io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImageBuildRunner(NativeImageBuildStep.java:294)
> [ERROR]         at
> io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:184)
> [ERROR]         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) [ERROR]         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [ERROR]         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR]         at
> java.base/java.lang.reflect.Method.invoke(Method.java:564) [ERROR]    
> at
> io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:882)
> [ERROR]         at
> io.quarkus.builder.BuildContext.run(BuildContext.java:277) [ERROR]    
> at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
> [ERROR]         at
> org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
> [ERROR]         at
> org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
> [ERROR]         at java.base/java.lang.Thread.run(Thread.java:832)
> [ERROR]         at
> org.jboss.threads.JBossThread.run(JBossThread.java:501) [ERROR] ->
> [Help 1]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source