How do you run your apps when developing? From com...
# compose-desktop
a
How do you run your apps when developing? From command line or Gradle tool window in IDE? I’m having an issue with the latter that it uses a wrong JDK to run it, ending up in error:
Copy code
MainKt 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
./gradlew run
from command line works fine Where do I configure JDK for the IDE? (IntelliJ IDEA CE 2020.3.1)
c
File/Project Structure
a
I see the correct one there (the error is with
jdk1.8.0_192.jdk
)
d
That's right. You need JDK11+
a
Yeah, but I don’t see that jdk set anywhere, when I do
java -version
in terminal I get
openjdk version "15.0.2" 2021-01-19
I’m comparing with this sample https://github.com/JetBrains/compose-jb/tree/master/examples/imageviewer (which runs from IDE) and the only difference I see is project language level (they set 15), but it doesn’t fix it for me
I created my project using the built-in wizard and that was it
c
there is a separate setting for gradle vm. in preferences
a
That was it, thanks 👍