Supppose I have kotlin product and I want to make ...
# getting-started
s
Supppose I have kotlin product and I want to make parts of it scriptable by users run time. Could I load strings as kotlin script runtime, pass them objects and have them do something to those objects and return another object? Neither security or performance is important, but of course nice to have.
d
You should be able to add the kotlin compiler as a dependency and get it to compile the script, then use a classloader to load its output. Assuming jvm.
You can also use jdk's nashorn scripting engine
Which compiles and evaluates javascript
And there's jython, a python to java bytecode compiler.
You may also consider graalvm
I am not an expert in any of these but just some directions.
s
Good input @Dico, thanks
r
You should check out #scripting
1