Hi <@U0CHHN4F4>, how I can tell the JvmScriptCompi...
# scripting
s
Hi @ilya.chernikov, how I can tell the JvmScriptCompier the ClassLoader to load the script? all JvmGetScriptingClass properties is private
i
You need to pass it to the evaluation configuration, e.g. like here, but with a classloader instead of `null`: https://github.com/JetBrains/kotlin/blob/1.3.20/libraries/tools/kotlin-main-kts-test/test/org/jetbrains/kotlin/mainKts/test/mainKtsTest.kt#L26 Is it what you’re looking for?
s
Exacly that but the jvm block is not working, I find this way
Copy code
val evalConfig = ScriptEvaluationConfiguration(baseEvalConfig) {
            set(JvmScriptEvaluationConfiguration.actualClassLoader, bukkriptClassLoader)
        }
Kotlin version I'm using is 1.3.20-eap-100
i
you need the import statement:
Copy code
import kotlin.script.experimental.jvmhost.jvm
Ah, no
actualClassLoader
, but
baseClassLoader
set
should work too
đź‘Ť 1