Gluonfx noclassdeffounderrorJAVA

Программисты JAVA общаются здесь
Anonymous
Gluonfx noclassdeffounderror

Сообщение Anonymous »

Я получаю < /p>
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:893)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.lang.Thread.run(Thread.java:833)
at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
at com.oracle.svm.core.windows.WindowsPlatformThreads.osThreadStartRoutine(WindowsPlatformThreads.java:143)
Caused by: java.lang.NoClassDefFoundError: Lcom/fazecast/jSerialComm/SerialPort;
at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:348)
at com.oracle.svm.jni.JNIOnLoadFunctionPointer.invoke(JNILibraryInitializer.java)
at com.oracle.svm.jni.JNILibraryInitializer.callOnLoadFunction(JNILibraryInitializer.java:69)
at com.oracle.svm.jni.JNILibraryInitializer.initialize(JNILibraryInitializer.java:126)
at com.oracle.svm.core.jdk.NativeLibrarySupport.addLibrary(NativeLibrarySupport.java:186)
at com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibrary0(NativeLibrarySupport.java:142)
at com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibraryAbsolute(NativeLibrarySupport.java:101)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:54)

Я следовал требованиям, задокументированным по адресу https://docs.gluonhq.com/#_maven_archetype & https://docs.gluonhq.com/#platforms_windows
Проект, созданный в Intellij Idea, и я использую Maven Ver. 3.8.8 < /p>
Я использую командную строку x64 Native Tools (используя Windows 11 Pro) с целями ниже: < /p>
mvn gluonfx:run
mvn gluonfx:runagent
mvn gluonfx:build
mvn gluonfx:nativerun

Когда com.fazecast.jserialcomm.serialport не включен в проект, я могу запустить все 4 гола, так что я думаю, что моя установка сделана правильно. /> Это мой mre: < /p>
package org.example;

import com.fazecast.jSerialComm.SerialPort;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class App extends Application {

@Override
public void start(Stage stage) {

String name = "";

SerialPort[] portsArray = SerialPort.getCommPorts();

for (SerialPort port : portsArray) {

System.out.println(port.getDescriptivePortName());
name = port.getDescriptivePortName();

}

var label = new Label(name);
var scene = new Scene(new StackPane(label), 640, 480);
stage.setScene(scene);
stage.show();

}

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

}
< /code>
Это мой pom.xml: < /p>

4.0.0
org.example
untitled
1.0-SNAPSHOT

UTF-8
11
11



org.openjfx
javafx-controls
24


com.fazecast
jSerialComm
2.11.0





com.gluonhq
gluonfx-maven-plugin
1.0.26

org.example.App



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

11



org.openjfx
javafx-maven-plugin
0.0.6


default-cli

org.example.App









Подробнее здесь: https://stackoverflow.com/questions/795 ... founderror

Вернуться в «JAVA»