1
resposta

Erro na compilação de .jar para .exe Native Image

Ao executar o comando

./mvnw -Pnative native:compile

mesmo baixando o GraalVM e configurando as variáveis de ambiente, me deparei com esse erro:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:17 min
[INFO] Finished at: 2024-01-15T15:35:09-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.9.27:compile (default-cli) on project api: Execution of C:\Program Files\GraalVM\graalvm-jdk-17.0.9+11.1\bin\native-image.cmd @target\tmp\native-image-1323355313505700665.args returned non-zero result -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Alguma sugestão do que pode estar acontecendo?

1 resposta

Oi!

No Windows tem uma burocracia a mais em relação à instalação da GraalVM: https://www.graalvm.org/latest/docs/getting-started/windows/#prerequisites-for-using-native-image-on-windows