Gluonfx unfledlinkErrorJava

Java-Forum
Anonymous
 Gluonfx unfledlinkError

Post by Anonymous »

Ich bekomme < /p>

Code: Select all

[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB] Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:893)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at java.base@23/java.lang.Thread.runWith(Thread.java:1588)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at java.base@23/java.lang.Thread.run(Thread.java:1575)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:836)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:812)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB] Caused by: java.lang.UnsatisfiedLinkError: File /jni/win/x86_64/jd2xx.dll was not found inside JAR.
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at jd2xx.JD2XX.(JD2XX.java:760)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at org.example.App.start(App.java:19)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:839)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at java.base@23/java.security.AccessController.executePrivileged(AccessController.java:132)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at java.base@23/java.security.AccessController.doPrivileged(AccessController.java:400)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
[Sat Apr 05 15:47:01 CEST 2025][INFO] [SUB]     at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:185)
When running mvn gluonfx:nativerun
I have followed the requirements documented at https://docs.gluonhq.com/#_maven_archetype & https://docs.gluonhq.com/#platforms_windows
Project created in IntelliJ Idea and I'm mit Maven ver. 3.8.8 < /p>
Ich verwende die native Tools -Eingabeaufforderung von X64 (mit Windows 11 Pro) mit den folgenden Zielen: < /p>

Code: Select all

mvn gluonfx:run
mvn gluonfx:runagent
mvn gluonfx:build
mvn gluonfx:nativerun
< /code>
Wenn JD2XX nicht in dem Projekt enthalten ist, kann ich alle 4 Ziele in Ordnung ausführen, also denke ich, dass mein Setup richtig gemacht wird. https://github.com/0x6a77/jd2xx/tree/master/jd2xx-> jd2xx.jar ("Hinzufügen einer JAR-Datei mit referenzieren").  Java.mvn install:install-file -Dfile=C:\java\jd2xx\jd2xx.jar -DgroupId=com.example -DartifactId=jd2xx -Dversion=1.0.0 -Dpackaging=jar -DlocalRepositoryPath=C:\xx\yy\.m2\repository
< /code>
Wenn ich JD2XX in das Projekt einbeziehe Ich kann nur die ersten drei Ziele ausführen und eine Ausnahme übernehmen, wenn ich Gluonfx ausführe: Nativerun Ziel < /p>
Dies ist mein MRE: < /p>
package org.example;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import jd2xx.JD2XX;

import java.io.IOException;

public class App extends Application {

@Override
public void start(Stage stage) throws IOException {

Label labelWithJD2XXInfo = new Label();

JD2XX chosenPort = new JD2XX();
chosenPort.open(0);
chosenPort.setBaudRate(250000);
chosenPort.setDataCharacteristics(JD2XX.BITS_8, JD2XX.STOP_BITS_2, JD2XX.PARITY_NONE);
chosenPort.setFlowControl(JD2XX.FLOW_NONE, 0, 0);
labelWithJD2XXInfo.setText(String.valueOf(chosenPort.getDeviceInfo()));

var scene = new Scene(new StackPane(labelWithJD2XXInfo), 800, 500);

stage.setScene(scene);
stage.show();

}

public static void main(String[] args) {
launch();
}

}
< /code>
Dies ist mein pom.xml: < /p>

         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
org.example
test
1.0-SNAPSHOT

UTF-8
21
21



com.example
jd2xx
1.0.0


org.openjfx
javafx-controls
24





com.gluonhq
gluonfx-maven-plugin
1.0.26

org.example.App



org.apache.maven.plugins
maven-compiler-plugin
3.8.0

21



org.openjfx
javafx-maven-plugin
0.0.8

org.example.App




< /code>

Dies ist das Modul-info.java:
module org.example {
requires javafx.controls;
requires jd2xx;
exports org.example;
}
Beim Ausführen von gluonfx: Runagent Ziel Die Konfigurationsdateien werden in/natives Image/und wenn ich in Ressourcen-config.json sehe, kann ich sehen, dass Runagent JD2XX aufgehoben ist, da es mit
abgeholt wird, wie es mit
abgeholt wird, wie es mit
abgeholt wird, wie es mit
abgeholt wurde, wie es mit
aufgenommen wird{
"pattern":"jd2xx:\\Qjni\/win\/x86_64\/jd2xx.dll\\E"
}
< /code>
jni-config.json haben auch Informationen zu jd2xx: < /p>
{
"type":"Ljd2xx.JD2XX$DeviceInfo;"
},
{
"type":"Ljd2xx.JD2XX$DeviceInfo;"
},
{
"type":"Ljd2xx.JD2XX;"
},
{
"type":"Ljd2xx.JD2XX;"
},
{
"type":"Ljd2xx.JD2XXEventListener;"
},
{
"type":"Ljd2xx.JD2XXEventListener;"
},
...
...
...
{
"type":"jd2xx.JD2XX",
"fields":[{"name":"event"},{"name":"handle"},{"name":"kill"},{"name":"listener"}]
},
{
"type":"jd2xx.JD2XX",
"fields":[{"name":"event"},{"name":"handle"},{"name":"kill"},{"name":"listener"}]
},
{
"type":"jd2xx.JD2XX$DeviceInfo",
"fields":[{"name":"description"},{"name":"id"},{"name":"serial"},{"name":"type"}]
},
{
"type":"jd2xx.JD2XX$DeviceInfo",
"fields":[{"name":"description"},{"name":"id"},{"name":"serial"},{"name":"type"}]
}
< /code>
Ich bin mir nicht sicher, ob dies relevant ist, aber: < /strong> < /p>
jd2xx.jar enthält eine .dll (jd2xx.dll), die 3 andere .dll -Dateien benötigt:
ftd2xx.dll, kernl32.dll & msvcl & msvclt.dll, in meinem Fall, in meinem Fall, in dem in meinem Fall in meinem Fall in einem Fall in einem Fall in Msvcrt.dll, in diesem Fall, in einem Fall, in dem sich in meinem Fall in einem Fall in einem Fall befindet, in diesem Fall, in denen sich in meinem Fall in einem Fall in Msvcrt.dll & msvcrt.dll und in Msvcrt.dll. ../windows/system32

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post
  • Gluonfx unfledlinkError
    by Anonymous » » in Java
    0 Replies
    2 Views
    Last post by Anonymous
  • Gluonfx unfledlinkerror / verwenden .dll in .jar beim Ausführen natives Bild
    by Anonymous » » in Java
    0 Replies
    3 Views
    Last post by Anonymous
  • Gluonfx NoclassDeffoundError
    by Anonymous » » in Java
    0 Replies
    3 Views
    Last post by Anonymous