Tim Putnam
08/05/2025, 8:30 PMBasicJvmScriptingHost
embedded in an application that's dynamically loading JPMS modules using ModuleLayer
.
I simply want the classloader from this ModuleLayer
to be visible to the compiler. I"m setting baseClassLoader
in the host configuration thus:
val hostconf = ScriptingHostConfiguration {
jvm {
baseClassLoader(appClassloader)
}
}
I've also tried a variety of ways to set the classloader in the ScriptCompilationConfiguration
but to no avail. I don't want to add explicit jars (e.g. dependenciesFromClassloader()
). I just want it to use a provided classloader, but it always just uses the main/boot classloader.
This is something I've had working at some stage in the pass, but now doesn't seem to.
I feel like I'm missing something obvious - it seems to want external files? Please, any pointers?mikehearn
08/07/2025, 2:36 PMTim Putnam
08/07/2025, 6:48 PM