diff --git a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java index 7ba654eec7cfb..4ba84890c162c 100644 --- a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java +++ b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java @@ -70,6 +70,7 @@ public OpenhabGraalJSScriptEngine() { .option("js.commonjs-require-cwd", MODULE_DIR).option("js.nashorn-compat", "true") // to ease // migration .option("js.commonjs-require", "true") // enable CommonJS module support + .hostClassLoader(this.getClass().getClassLoader()) .fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) { @Override public SeekableByteChannel newByteChannel(Path path, Set options,