Graham Dean
04/15/2021, 9:58 AMjavafx
and my build.gradle.kts has these dependencies in it. If I rip out the javafx
dependencies and associated code, the app installs and runs fine. 1) How can I package up my app to run with javafx?, and 2) is there a way to diagnose the running of the .exe issue (e.g. any diagnostics or logs to view)?
build.gradle.kts excerpts:
plugins {
kotlin("jvm") version "1.4.30"
id("org.jetbrains.compose") version "0.3.0"
id("org.openjfx.javafxplugin") version "0.0.9"
}
...
javafx {
modules("javafx.controls", "javafx.swing", "javafx.media")
}
Thanks!olonho
04/15/2021, 10:45 AMrunDistributable
which could be helpful here.Graham Dean
04/15/2021, 5:38 PMjpackage
with the --win-console
option might be useful (https://stackoverflow.com/a/64614660/5670695). How can I change the jpackage
options used by the Gradle tasks?
Note: for some reason, runDistributable
fails to execute the app for me with:
Starting process 'command 'CorrectAppName.exe''. Working directory: C:\<correct path>\CorrectAppName Command: CorrectAppName.exe
CreateProcess error=2, The system cannot find the file specified
olonho
04/19/2021, 7:22 AMalexey.tsvetkov
04/19/2021, 7:56 AM--win-console
can be specified like this:
compose.desktop {
application {
nativeDistributions {
windows {
console = true
}
}
}
}
Also you can check out the DSL reference here.alexey.tsvetkov
04/19/2021, 7:59 AMrunDistributable
error: could you try a newer build (e.g. 0.4.0-build180)? I remember fixing a similar issue some time ago.Graham Dean
04/19/2021, 8:06 AMimplementation("org.openjfx:javafx-controls:13")
implementation("org.openjfx:javafx-swing:13")
implementation("org.openjfx:javafx-media:13")
// To resolve: java.lang.NoClassDefFoundError: "jdk/swing/interop/SwingInterOpUtils" when trying to jfxPanel.setScene()
implementation(files("packaging-libs/jdk.unsupported.desktop-jdk15.jar"))
Kapil Yadav
08/09/2023, 12:57 PMjava.lang.NoClassDefFoundError: "jdk/swing/interop/SwingInterOpUtils"
Im facing this issue @Graham Dean
and I added
implementation(files("packaging-libs/jdk.unsupported.desktop-jdk15.jar"))
but ig this jar isnt at my side so how to do it >alexey.tsvetkov
08/09/2023, 1:03 PMjdk.unsupported.desktop
module dependency?
compose.desktop {
application {
nativeDistributions {
modules("jdk.unsupported.desktop")
}
}
}
If that helps, I recommend reading this section of the docs https://github.com/JetBrains/compose-multiplatform/tree/master/tutorials/Native_distributions_and_local_execution#configuring-included-jdk-modules