With JSR 223 there are samples in kotlin-script-ut...
# scripting
i
With JSR 223 there are samples in kotlin-script-util.jar where the classpath is extracted from the context.