mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[jsscripting] Tell the script context to use the classloader of the current class. (#11400)
Fixes #11222 Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
parent
6a33a3fd27
commit
cb9b69943c
@ -70,6 +70,7 @@ public class OpenhabGraalJSScriptEngine extends InvocationInterceptingScriptEngi
|
|||||||
.option("js.commonjs-require-cwd", MODULE_DIR).option("js.nashorn-compat", "true") // to ease
|
.option("js.commonjs-require-cwd", MODULE_DIR).option("js.nashorn-compat", "true") // to ease
|
||||||
// migration
|
// migration
|
||||||
.option("js.commonjs-require", "true") // enable CommonJS module support
|
.option("js.commonjs-require", "true") // enable CommonJS module support
|
||||||
|
.hostClassLoader(getClass().getClassLoader())
|
||||||
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
|
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
|
||||||
@Override
|
@Override
|
||||||
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options,
|
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options,
|
||||||
|
Loading…
Reference in New Issue
Block a user