heyzoos
04/25/2018, 1:22 PMjavax.script
support that was introduced in Kotlin 1.1, however the first line always throws a NullPointerException
.
val engine = ScriptEngineManager().getEngineByExtension("kts")!!
engine.eval("val x = 3")
println(engine.eval("x + 2")) // Prints out 5
I'm extremely new to this language and its tooling, is there something obvious I'm missing? I was under the impression that it would sort of just "come with" the language but I wouldn't be surprised at all if I need to install a dependency or two. My google skills have been failing me unfortunately.poohbar
04/25/2018, 1:35 PMheyzoos
04/25/2018, 6:31 PM