I have installed kotlin on ubuntu using sdkman command sdk install kotlin. Kotlin installed and I tested whether kotlinc command takes me to the kotlin interactive shell. It works and the shell executes the kotlin language.
When I tried running Code Runner add-on in VS Code to execute a .kt file with a basic println("Hello World") function with name main, I get the following error:
[Running] cd "/home/user/Dropbox/user/kotlin/" && kotlinc bgn_hello.kt -include-runtime -d bgn_hello.jar && java -jar bgn_hello.jar
/bin/sh: 1: kotlinc: not found
[Done] exited with code=127 in 0.007 seconds
Does anyone please have an idea why VS Code is not able to execute the kotlin file?