Using Kotlin REPL programmatically

I have problems when I tried to use the Kotlin JSR223 scripting interface,
how can I call the Kotlin REPL directly to evaluate expressions programmatically?