Skip to content

Commit

Permalink
[jsscripting] Tell the script context to use the classloader of the c…
Browse files Browse the repository at this point in the history
…urrent class. (openhab#11400)

Fixes openhab#11222

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
  • Loading branch information
digitaldan authored and Nemer_Daud committed Jan 28, 2022
1 parent b8909ce commit 3da2ef6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(getClass().getClassLoader())
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
@Override
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options,
Expand Down

0 comments on commit 3da2ef6

Please sign in to comment.