Kotlin Script Engine does not work

Why RS223 conforming Kotlin Script Engine does not work?

I use code like:

import javax.script.ScriptEngine

class KScriptEngine {
companion object {
public var ScriptEngine: ScriptEngine = javax.script.ScriptEngineManager().getEngineByName(“kotlin”)
public fun test() = ScriptEngine.eval(“println("hi kotlin")”)
}

}

when I call the test() function the error that is displayed is:
javax.script.ScriptException: ERROR Unable to initialize repl compiler: