Not 100% related but it seems compose desktop need...
# compose-desktop
p
Not 100% related but it seems compose desktop needs java 11. I thought I could just specify that in gradle:
Copy code
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(11))
    }
}
But when running from the command line:
./gradlew run
It shows an error:
Copy code
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: org/jetbrains/skiko/Library has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
e
I suppose the Kotlin Gradle plugin must be changed to take Gradle Java Toolchains into account before this can work out of the box https://youtrack.jetbrains.com/issue/KT-43095
b
Also note that you need Java 14+ to build native executables
o
guess setting JAVA_HOME shall help
p
Yeah for me too. But I love how the project is self contained and reproducible when you just set the jdk version in gradle.
s
to package it, you need Java 15