我正在关注 Gluon 提供的文档:here。
为了简单起见,我将尝试直截了当,给出我通过的里程碑以及我遇到的问题。
--------- 环境:
操作系统: Windows 10 x64
IDE: Eclipse,版本:2021-12 (4.22.0)
JAVA: jdk17.0.1
JAVAFX: javafx-sdk-17.0.1
GraalVM: graalvm-svm- java17-windows-gluon-22.0.0.2-
Eclipse 的最终 Gluon 插件: 2.8.2
Visual Studio: 1.63.2(具有文档中描述的所有必需扩展)
Wix: 3.11.2.24516
--------- 配置
Maven: apache-maven-3.8.4
Pom:这是我的 POM 的第一部分的截图,可以在这里找到。环境变量: JAVA_HOME + GRAALVM_HOME + MAVEN_HOME --------- 完成:
JavaFX(v17) 应用程序:
--------- 问题:
无法完成 Gluon 目标“mvn gluonfx:build”或“gluonfx:build”!这是我所做的:
- 按照此处的指示:“如果您在 Windows 上运行,则需要从 x64 终端运行所有 GluonFX 目标。”,我打开“x64 Native Tools Command Prompt for VS 2022”
- 导航到我的 POM 所在的项目文件夹。
- 运行指令
mvn gluonfx:build
。我还尝试按照建议“打开运行配置...”窗口并将目标更新为 gluonfx:build 并单击“运行”的说明进行操作。两者都导致失败!在这篇文章的最后是终端报告显示:
- 我确实使用提到的选项--allow-incomplete-classpath 运行。
- 我确实在文件 jniconfig-x86_64-windows.json 中找到了报告的“丢失”cached_scope_id,该文件恰好在上述路径上。如果需要,这是文件。
几天以来,我一直在努力扭转一切,并在网上搜索了一些线索……但直到现在还没有运气:-(……有人可以帮我解决这个问题吗?
PS。我确实使用了外部 DLL(是的,仅限 Windows,但是嘿:我们正在尝试在这里进行 NATIVE 构建,因此,在 Windows 中 ;-),应该没问题);此 DLL 附加了 JNI。我也试着玩这个......没有运气。
--------- 终端报告:(
如前所述,完整日志,here)
D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler>mvn gluonfx:build
[INFO] Scanning for projects...
[INFO]
[INFO] --< com.plpr.application:gluon-mobile---single-view-project--allow-incomplete-classpath >--
[INFO] Building Gluon Mobile - Single View Project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.8:build (default-cli) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[INFO] Scanning for projects...
[INFO]
[INFO] --< com.plpr.application:gluon-mobile---single-view-project--allow-incomplete-classpath >--
[INFO] Building Gluon Mobile - Single View Project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> gluonfx-maven-plugin:1.0.8:compile (default-cli) > process-classes @ gluon-mobile---single-view-project--allow-incomplete-classpath >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< gluonfx-maven-plugin:1.0.8:compile (default-cli) < process-classes @ gluon-mobile---single-view-project--allow-incomplete-classpath <<<
[INFO]
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.8:compile (default-cli) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[lun. févr. 07 15:17:25 CET 2022][INFO] ==================== COMPILE TASK ====================
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
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
[lun. févr. 07 15:17:26 CET 2022][INFO] We will now compile your code for x86_64-microsoft-windows. This may take some time.
[lun. févr. 07 15:17:28 CET 2022][INFO] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[lun. févr. 07 15:17:30 CET 2022][INFO] [SUB] ========================================================================================================================
[lun. févr. 07 15:17:30 CET 2022][INFO] [SUB] GraalVM Native Image: Generating 'com.plpr.application.gluonapplication'...
[lun. févr. 07 15:17:30 CET 2022][INFO] [SUB] ========================================================================================================================
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] [1/7] Initializing...
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] (4,2s @ 0,16GB)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Error: Error parsing JNI configuration in D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\jniconfig-x86_64-windows.json:
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Field java.net.Inet6Address.cached_scope_id not found. To allow unresolvable reflection configuration, use option --allow-incomplete-classpath
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option JNIConfigurationFiles.
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] com.oracle.svm.core.util.UserError$UserException: Error parsing JNI configuration in D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\jniconfig-x86_64-windows.json:
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Field java.net.Inet6Address.cached_scope_id not found. To allow unresolvable reflection configuration, use option --allow-incomplete-classpath
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option JNIConfigurationFiles.
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.doParseAndRegister(ConfigurationParserUtils.java:135)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.lambda$parseAndRegisterConfigurations$1(ConfigurationParserUtils.java:86)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:214)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:515)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.IntPipeline.sum(IntPipeline.java:473)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.parseAndRegisterConfigurations(ConfigurationParserUtils.java:88)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.jni.access.JNIAccessFeature.afterRegistration(JNIAccessFeature.java:128)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.lambda$setupNativeImage$14(NativeImageGenerator.java:802)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:74)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:802)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:534)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:494)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:426)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:587)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:126)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:617)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] 0,1s (3,0% of total time) in 8 GCs | Peak RSS: 0,85GB | CPU load: 5,50
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Produced artifacts:
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\Gluon Mobile - Single View Project\com.plpr.application.gluonapplication.build_artifacts.txt
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] ========================================================================================================================
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Failed generating 'com.plpr.application.gluonapplication' after 2,3s.
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Error: Image build request failed with exit status 1
[lun. févr. 07 15:17:31 CET 2022][SEVERE] Process compile failed with result: 1
Check the log files under D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\log
And please check https://docs.gluonhq.com/ for more information.
[lun. févr. 07 15:17:31 CET 2022][INFO] Logging process [compile] to file: D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\log\process-compile-1644243451215.log
[lun. févr. 07 15:17:31 CET 2022][SEVERE] Compiling failed.
Check the log files under D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.934 s
[INFO] Finished at: 2022-02-07T15:17:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.8:compile (default-cli) on project gluon-mobile---single-view-project--allow-incomplete-classpath: Compiling failed -> [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
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.723 s
[INFO] Finished at: 2022-02-07T15:17:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.8:build (default-cli) on project gluon-mobile---single-view-project--allow-incomplete-classpath: Error, gluonfx:build failed -> [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