https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
g

Giuliopime

10/18/2023, 5:30 PM
Hi great people, I have an issue with the awt dependency I wanted to use https://github.com/dorkbox/SystemTray because of some weird behaviour of the default available API for the tray in compose (https://github.com/JetBrains/compose-multiplatform/issues/1847) but I get the following error:
Copy code
Exception in thread "main" java.lang.LinkageError: loader 'bootstrap' attempted duplicate class definition for java.awt.TrayIcon. (java.awt.TrayIcon is in module java.desktop of loader 'bootstrap')
I have conflicting dependency because compose desktop also uses awt. Do you know if it's possible to exclude that dependency from the SystemTray lib? I already tried with
exclude
but I couldn't get it to work
Copy code
implementation("com.dorkbox:SystemTray:4.4") {
    // tried both
    exclude("java.desktop")
    exclude("java.awt")
}
Am I doing it wrong?
🤔 2
4 Views