Join Slack
Powered by
I assume that you’re using one of the example JSR2...
# scripting
i
ilya.chernikov
02/27/2017, 9:35 AM
I assume that you’re using one of the example JSR223 projects, e.g.
https://github.com/JetBrains/kotlin/tree/1.1.0/libraries/examples/kotlin-jsr223-daemon-local-eval-example
. You need to create a similar one, but use your own factory, by copying and modifying this one -
https://github.com/JetBrains/kotlin/blob/1.1.0/libraries/tools/kotlin-script-util/src/main/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineFactoryExamples.kt#L49
In particular you need to replace call to
scriptCompilationClasspathFromContext
, with the minimal classpath needed for your script. You need to make sure that at least
kotlin-script-runtime
and java stdlib is included there.
3
Views
Open in Slack
Previous
Next