Join Slack
Powered by
Does anyone know of a solution to run Kotlin sourc...
# announcements
m
mplacona
04/14/2018, 9:08 PM
Does anyone know of a solution to run Kotlin source code at runtime? Found this post from 2015, but wondering if there's been any updates from then.
https://discuss.kotlinlang.org/t/loading-source-at-runtime/58
c
Czar
04/14/2018, 9:25 PM
You can do that, although it is a bit clunky at the moment. Try asking in
#C0BT46EL8
Also check out these examples: 1)
https://github.com/JetBrains/kotlin/tree/953a485fe7628a76f32f4b32cb4b0e942bd8fcc7/libraries/examples/kotlin-jsr223-daemon-local-eval-example
2)
https://github.com/JetBrains/kotlin/tree/953a485fe7628a76f32f4b32cb4b0e942bd8fcc7/libraries/examples/kotlin-jsr223-local-example
m
mplacona
04/14/2018, 9:27 PM
I'll have a look. Thanks
simple smile
1
mplacona
04/14/2018, 9:37 PM
Seems like
getEngineByExtension("kts")
always returns
null
.
mplacona
04/14/2018, 9:41 PM
nvm. Last bit of text on this answer helped:
https://stackoverflow.com/a/44009876/279395
mplacona
04/14/2018, 9:44 PM
Thanks again
@Czar
simple smile
1
2
Views
Open in Slack
Previous
Next