-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaFX native-image build failing #385
Labels
bug
Something isn't working
Comments
You didn't initialize the Visual Studio environnement variables. Check Windows prerequisites https://www.graalvm.org/22.0/reference-manual/native-image/#prerequisites And in the linked medium blog post, don't forget the step: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To Reproduce
Steps to reproduce the behavior:
Describe the issue
Hello! I'm using GraalVM and IntelliJ IDEA. When I'm trying to build my project via IDE it's messaging me:
Error: Unable to detect supported WINDOWS native software development toolchain.
Querying with command ''C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe'' prints:
Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Then, I tried to compile native-image via console, x64 Native Tools Command Promts for VS 2022 it says: Error: JavaFX runtime components are missing, and are required to run this application and honestly, I don;t know why I can't solve it, but I can't
Steps to reproduce the issue
Please include both build steps as well as run steps
https://github.com/HeartOfGlass404/COVID-Risk – my project
via console I'm following the guide (typing 1)mvn clean package; 2) mvn -Pnative -Dagent exec:exec@java-agent) and on the 2-nd step it gives me "JavaFX missing" error
via IntelliJ I'm just simply pushing "run" button, my VM options: "D:\Java\javafx-sdk-19\lib" --add-modules javafx.controls,javafx.fxml -H:-CheckToolchain
CLI options: --module-path D:\Java\javafx-sdk-19\lib --add-modules javafx.fxml,javafx.controls,javafx.graphics
Describe GraalVM and your environment:
GraalVM version – 19
JDK major version: 19
OS: Windows 10
Architecture: x64
More details
IntelliJ Trace:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< adianov.sergei:COVID-Risk >----------------------
[INFO] Building COVID-Risk 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ COVID-Risk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ COVID-Risk ---
[WARNING] *********************************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [commons-math3-3.6.1.jar, SparseBitSet-1.2.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] *********************************************************************************************************************************************************************
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ COVID-Risk ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Desktop\COVID-Risk\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ COVID-Risk ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ COVID-Risk ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ COVID-Risk ---
[INFO]
[INFO] --- native-maven-plugin:0.9.18:compile-no-fork (default) @ COVID-Risk ---
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO] Executing: C:\Users\Sergei.jdks\graalvm-ce-19\bin\native-image.cmd https://github.com/target\tmp\native-image-18324928757939665749.args
���⥬� �� 㤠���� ���� 㪠����� ����.
GraalVM Native Image: Generating 'Covid-risk' (executable)...
[1/7] Initializing... (0,0s @ 0,19GB)
0,5s (6,3% of total time) in 11 GCs | Peak RSS: 0,85GB | CPU load: 2,91
Failed generating 'Covid-risk' after 6,5s.
Error: Unable to detect supported WINDOWS native software development toolchain.
Querying with command ''C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe'' prints:
Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.958 s
[INFO] Finished at: 2023-01-11T22:55:47+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.9.18:compile-no-fork (default) on project COVID-Risk: Execution of C:\Users\Sergei.jdks\graalvm-ce-19\bin\native-image.cmd https://github.com/target\tmp\native-image-18324928757939665749.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:https://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Process finished with exit code 1
Console trace: Finished generating 'Covid-risk' in 48,1s.
[INFO]
[INFO] --- maven-assembly-plugin:3.3.0:single (default) @ COVID-Risk ---
[WARNING] Failed to build parent project for org.openjfx:javafx-controls:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-controls:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-graphics:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-graphics:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-base:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-base:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-fxml:jar:19-ea+7
[WARNING] Failed to build parent project for org.openjfx:javafx-fxml:jar:19-ea+7
[INFO] Building jar: D:\Desktop\COVID-Risk\target\COVID-Risk-1.0-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.996 s
[INFO] Finished at: 2023-01-11T22:29:14+03:00
[INFO] ------------------------------------------------------------------------
D:\Desktop\COVID-Risk> mvn -Pnative -Dagent exec:exec@java-agent
[INFO] Scanning for projects...
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO]
[INFO] ---------------------< adianov.sergei:COVID-Risk >----------------------
[INFO] Building COVID-Risk 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:exec (java-agent) @ COVID-Risk ---
Error: JavaFX runtime components are missing, and are required to run this application
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.129 s
[INFO] Finished at: 2023-01-11T22:29:48+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (java-agent) on project COVID-Risk: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [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:https://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The text was updated successfully, but these errors were encountered: