1
resposta

Erro ao gerar código nativo Windows

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.9.0.Final:build (default) on project bitcoin: 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.getNativeImageExecutable(NativeImageBuildStep.java:571) [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImage(NativeImageBuildStep.java:341) [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:113) [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:936) [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277) [ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) [ERROR] at java.base/java.lang.Thread.run(Thread.java:832) [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)

1 resposta

Para min deu o mesmo erro, resolvi criando a variável de ambiente GRAALVM_HOME e nela coloquei o caminho do graalvm, depois adicionei no Path

%GRAALVM_HOME%\bin

Abri e fechei o PowerShell, executei de novo, ai funcionou