gluonhq / gluonfx-maven-plugin

Plugin that simplifies creating native images for Java/JavaFX maven projects
BSD 3-Clause "New" or "Revised" License
186 stars 38 forks source link

Process run until end failed with result: -1073741819 #480

Open Ggbr-TaoLi opened 12 months ago

Ggbr-TaoLi commented 12 months ago

I've had the same problems running simple examples of this project as other people's successful projects. environment: Operating System is win10. javafx-sdk-21-ea+5 graalvm-ce-java17-22.3.0

The runagent and build commands can be executed normally. However, when nativerun is executed, the Javafx interface cannot be displayed normally and an error occurs.

nativerun : [INFO] [INFO] -----------------------< org.ohosdev:hapviewer >------------------------ [INFO] Building HapViewer 1.0.0 [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- gluonfx-maven-plugin:1.0.18:nativerun (default-cli) @ hapviewer --- 8月 03, 2023 11:42:17 上午 com.gluonhq.substrate.util.Logger logInfo 信息: Substrate is tested with the Gluon's GraalVM build which you can find at https://github.com/gluonhq/graal/releases. While you can still use other GraalVM builds, there is no guarantee that these will work properly with Substrate [周四 8月 03 11:42:17 CST 2023][信息] ==================== RUN TASK ==================== [周四 8月 03 11:42:17 CST 2023][信息] [SUB] 8�� 03, 2023 11:42:17 ���� com.sun.javafx.application.PlatformImpl startup [周四 8月 03 11:42:17 CST 2023][信息] [SUB] ����: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @7fa98a66' [周四 8月 03 11:42:21 CST 2023][严重] Process run until end failed with result: -1073741819 Check the log files under D:\TEMP\hap-viewer-master\target\gluonfx\x86_64-windows\gvm\log And please check https://docs.gluonhq.com/ for more information. [周四 8月 03 11:42:21 CST 2023][信息] Logging process [run until end] to file: D:\TEMP\hap-viewer-master\target\gluonfx\log\process-run until end-1691034141016.log


        |       ||   |    |  | |  ||       ||  |  | |
        |    ___||   |    |  | |  ||   _   ||   |_| |
        |   | __ |   |    |  |_|  ||  | |  ||       |
        |   ||  ||   |___ |       ||  |_|  ||  _    |
        |   |_| ||       ||       ||       || | |   |
        |_______||_______||_______||_______||_|  |__|

Access to the latest docs, tips and tricks and more info on
how to get support? Register your usage of Gluon Substrate now at

https://gluonhq.com/activate

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.049 s [INFO] Finished at: 2023-08-03T11:42:23+08:00 [INFO] ------------------------------------------------------------------------

Hope to get answers, thank you very much!

Ggbr-TaoLi commented 12 months ago

I found the crux of the problem and guessed that it was due to another version of java installed on the computer, resulting in a flash problem.The glass.dll file for the older version of java appears in the execution path at graal compile time. The solution is to add a statement inside the main function。adding System.setProperty("java.library.path", "runtime\bin;runtime\lib"); or delete an older version of the java path from the computer environment variable Path.

Solutions found from #1190, thanks!