Error: no class roots are found in the JDK path: /usr/lib/jvm/java-9-openjdk-amd64

HI

I follow the process stated in this article, https://kotlinlang.org/docs/tutorials/command-line.html in WSL Ubuntu 06.04. on the part of sdkman.

successfully installed all the requirement, sdk and kotlin and java jdk.

But when I try to run my first Hello world using this keyword.

kotlinc Hello.kt -include-runtime -d Hello.jar

it reposnse

error: no class roots are found in the JDK path: /usr/lib/jvm/java-9-openjdk-amd64

what to do with that?

Which version of Kotlin are you using? If memory serves, you need at least version 1.2 to be able to use Kotlin with Java 9.

I used the latest, 1.2.40

This is an unknown problem that we’ll have to investigate. Please report an issue at https://kotl.in/issue.

Meanwhile, as a workaround, try also adding the following argument: -jdk-home $JAVA_HOME

Done creating issue for it