Skip to content

Packaging Compose for Desktop fails, missing ManagmentFactory -> used for SystemClock.elapsedRealtime() #466

Closed Answered by AlbRoehm
AlbRoehm asked this question in Q&A
Discussion options

You must be logged in to vote

In case someone else looks for this. Add the includeAllModules = true flag fixes this issue.

compose.desktop {
    application {
        mainClass = "com.example.desktop.MainKt"
        javaHome = System.getenv("JAVA_HOME")

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            modules("java.management", "java.sql", "jdk.unsupported") // or includeAllModules = true  // <--
            packageName = "ExampleDesktop"
            packageVersion = "1.0.0"
        }
    }
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by AlbRoehm
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants