JVM target for Kotlin Scratch Files
Answered
Hi! I'm wondering how to change jvm-target for Kotlin Scratch files ? It's a useful thing I enjoy to use ) But It doesn't work when I want to call Java static functions. Project is under Gradle and jvm-target is set to 1.8 in its build.gradle.kts file as well as in Settings --> Build, Execution, Deployment --> Compiler --> Kotlin Compiler. But it doesn't affect sratch files.
Path.of("path/to/some/file") --> "Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'"
Please sign in to leave a comment.
Here is a related issue on YouTrack:
https://youtrack.jetbrains.com/issue/KT-35743
Feel free to watch it in order to be notified once it has updates. See this article if you are not familiar with YouTrack.