我在 Windows 下通过 GluonFX 编译了我的 JAVA 程序,以获得本地语言版本。程序运行时,我收到各种错误消息,例如: java.lang.NoSuchMathodException: java.lang.Math.sin (double)
当我运行 mvn gluonfx 时,以下是其他错误:nativerun
[lun nov 29 09:39:00 CET 2021][INFO] ===================== 运行任务============= ======= [lun nov 29 09:39:00 CET 2021][FINE] 运行到结束的 PB 命令:C:\Gluon\MathPlaceTest\target\gluonfx\x86_64-windows\MathPlaceTest.exe [lun nov 2021 年 11 月 29 日 09:39:00 CET][FINE] 开始进程运行直到结束... [2021 年 11 月 29 日 09:39:01 CET][INFO] [SUB] 主要 [2021 年 11 月 29 日 09:39:01 CET ][INFO] [SUB] 2021 年 11 月 29 日上午 9:39:01 com.sun.javafx.application.PlatformImpl 启动 [lun nov 29 09:39:01 CET 2021][INFO] [SUB] 警告:不支持的 JavaFX 配置:类是从“未命名的模块@1729ec00”[lun nov 29 09:40:58 CET 2021][INFO][SUB] 线程“JavaFX 应用程序线程”中的异常 java.lang.AssertionError:java.lang.ClassNotFoundException:javafx .scene.shape.Polyline
[lun nov 29 09:44:45 CET 2021][INFO] [SUB] java.lang.ClassNotFoundException: com.sun.prism.shader.Solid_TextureRGB_AlphaTest_Loader
[lun nov 29 09:44:46 CET 2021][INFO] [SUB] java.lang.InternalError:加载库存着色器 Solid_TextureRGB_AlphaTest 时出错 [lun nov 29 10:41:36 CET 2021][INFO] [SUB] 警告:不支持JavaFX 配置:类是从“未命名模块 @6d074b14”加载的 [lun nov 29 10:41:48 CET 2021][INFO] [SUB] java.lang.ClassNotFoundException: com.sun.prism.shader.Solid_TextureRGB_AlphaTest_Loader
另一个问题:第二个窗口打开,但它是白色的。我认为我在此处报告的 pom.xml 文件中存在错误或缺失。我寻求帮助
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<javafx.version>16</javafx.version>
<charm.version>6.0.6</charm.version>
<glisten.afterburner.version>2.0.5</glisten.afterburner.version>
<attach.version>4.0.11</attach.version>
<connect.version>2.0.1</connect.version>
<javafx.maven.plugin.version>0.0.6</javafx.maven.plugin.version>
<gluonfx.maven.plugin.version>1.0.4</gluonfx.maven.plugin.version>
<main.class>com.gluonmathplace.DiMath</main.class>
</properties>
<artifactId>DiMath</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>com.gluonmathplace</groupId>
<packaging>jar</packaging>
<name>MathPlaceTest</name>
<repositories>
<repository>
<id>gluon-releases</id>
<url>https://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
</dependency>
<!--prova-->
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>display</artifactId>
<version>${attach.version}</version>
<classifier>desktop</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>ble</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>lifecycle</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>position</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>statusbar</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>storage</artifactId>
<version>${attach.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq.attach</groupId>
<artifactId>util</artifactId>
<version>${attach.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx.maven.plugin.version}</version>
<configuration>
<mainClass>${main.class}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>gluonfx-maven-plugin</artifactId>
<version>${gluonfx.maven.plugin.version}</version>
<configuration>
<target>${gluonfx.target}</target>
<verbose>true</verbose>
<attachList>
<list>display</list>
<list>lifecycle</list>
<list>position</list>
<list>statusbar</list>
<list>storage</list>
</attachList>
<mainClass>${main.class}</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ios</id>
<properties>
<gluonfx.target>ios</gluonfx.target>
</properties>
</profile>
<profile>
<id>android</id>
<properties>
<gluonfx.target>android</gluonfx.target>
</properties>
</profile>
</profiles>
</project>