Eroica / javafx-fluent-theme

A custom theme for JavaFX following Windows 11's designs
zlib License
49 stars 1 forks source link

javafx-fluent-theme支持使用java吗 #2

Open myj365 opened 1 month ago

myj365 commented 1 month ago

在使用java语言时报错

Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/io/CloseableKt
    at fluent/earth.groundctrl.fluent.lib.Windows.isAmdGpu(Windows.kt:29)
    at fluent/earth.groundctrl.fluent.FluentApp$Companion.initialize(FluentApp.kt:18)
    at fluent/earth.groundctrl.fluent.FluentApp.initialize(FluentApp.kt)
    at com.example.fxdemo/com.example.fxdemo.Main.main(Main.java:8)
Caused by: java.lang.ClassNotFoundException: kotlin.io.CloseableKt
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
    ... 4 more

是说只能使用kotlin吗?有办法绕过吗?

Eroica commented 1 month ago

收到了,我等一會檢查一下

Eroica commented 1 month ago

Demo源碼肯定需要Kotlin,用Gradle的話能不能這樣匯入:https://github.com/Eroica/javafx-fluent-theme/tree/java-demo

或者下載JAR直接匯入:https://github.com/Eroica/javafx-fluent-theme/releases/tag/v2024.05

再等幾天我回到家就會有正確的答案...