Skip to content

Commit

Permalink
Tell the script context to use the classloader of the current class.
Browse files Browse the repository at this point in the history
Fixes openhab#11222

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
  • Loading branch information
digitaldan committed Oct 17, 2021
1 parent 31668b3 commit c4cad35
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(this.getClass().getClassLoader())
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
@Override
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options,
Expand Down

0 comments on commit c4cad35

Please sign in to comment.