Kotlin script engine error


#1

I’m attempting to use javax script engine w/ kotlin, I’m getting this warning when evaluating any code “Failed to initialize native filesystem for Windows
java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.”

Any help would be greatly appreciated :slight_smile:

my code
fun main(args: Array) {
val scriptEngine = ScriptEngineManager().getEngineByExtension(“kts”)

scriptEngine.eval("println(\"Hello, World!\")")

}


#2

I fixed it, needed to call setIdeaIoUseFallback() before creating the script engine