Looks like there was an oversight in what all packages / classes nashorn uses.

You will need to open WILDFLY_HOME/modules/system/layers/base/sun/jdk/main/module.xml file and add

<path name="jdk/nashorn/api/scripting"/>
<path name="jdk/nashorn/api/scripting/resources"/>
<path name="jdk/nashorn/internal/codegen"/>
<path name="jdk/nashorn/internal/codegen/types"/>
<path name="jdk/nashorn/internal/ir"/>
<path name="jdk/nashorn/internal/ir/annotations"/>
<path name="jdk/nashorn/internal/ir/debug"/>
<path name="jdk/nashorn/internal/ir/visitor"/>
<path name="jdk/nashorn/internal/lookup"/>
<path name="jdk/nashorn/internal/objects"/>
<path name="jdk/nashorn/internal/objects/annotations"/>
<path name="jdk/nashorn/internal/parser"/>
<path name="jdk/nashorn/internal/runtime"/>
<path name="jdk/nashorn/internal/runtime/arrays"/>
<path name="jdk/nashorn/internal/runtime/linker"/>
<path name="jdk/nashorn/internal/runtime/options"/>
<path name="jdk/nashorn/internal/runtime/regexp"/>
<path name="jdk/nashorn/internal/runtime/regexp/joni"/>
<path name="jdk/nashorn/internal/runtime/resources"/>
<path name="jdk/nashorn/internal/runtime/resources/fx"/>
<path name="jdk/nashorn/internal/runtime/scripts"/>
<path name="jdk/nashorn/internal/tools"/>
<path name="jdk/nashorn/internal/tools/resources"/>
<path name="jdk/internal/dynalink"/>
<path name="jdk/internal/dynalink/beans"/>
<path name="jdk/internal/dynalink/linker"/>
<path name="jdk/internal/dynalink/support"/>

and any other path/package that might be missing.

for reference, this is how this file looks in 8.x branch

I also created Pull requests to fix this in WildFly master and 8.x branch

Nashorn class not found in WildFly - Stack Overflow

https://stackoverflow.com/questions/24478436/nashorn-class-not-found-in-wildfly

... <path name="jdk/nashorn/internal/runtime/linker"/> <path name="jdk/nashorn/ internal/runtime/options"/> <path ...

The Nashorn Java API

https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html

You might not be aware of this until an error is thrown when you attempt to use it as a class. ... Nashorn defines the Java global object that has several functions for working ... Nashorn invokes the corresponding constructor based on the arguments ... String jjs> var b = a + "def" jjs> b.class class jdk.nashorn.internal. runtime.

jdk.nashorn.internal.ir.annotations does not exist - Stack Overflow

https://stackoverflow.com/questions/59126867/jdk-nashorn-internal-ir-annotations-does-not-exist

Not sure if this will help you so many months later, I think you used the spring web initializer to create a new project, at the test class you will find ...

Starting Logstash is encountering errors · Issue #11221 · elastic ...

https://github.com/elastic/logstash/issues/11221

Oct 15, 2019 ... 2019-10-15 15:28:02,288 main ERROR No ScriptEngine found for language ... < init>(Options.java:702) at jdk.nashorn.internal.runtime.options.

Nashorn - Can not find a common class loader for ScriptObject and ...

https://stackoverflow.com/questions/40877274/nashorn-can-not-find-a-common-class-loader-for-scriptobject-and-myinterface

ClassLoader myClassLoader = myScript.getScriptInterfaceClass(). getClassLoader(); Class.forName("jdk.nashorn.internal.runtime.ScriptObject", ...

jdk.nashorn.internal.runtime.StructureLoader

http://www.oracle.com/technetwork/java/jvmls2016-haupt-nashorn-3125551.pdf

Nashorn APIs jdk.scripting.nashorn javax.script .scripting .tree .linker javax.script API. (JSR 223) jdk.nashorn.api.scripting API. • AddiPonal API “missing” in javax.

nashorn-backport/Lexer.java at master · wro4j/nashorn-backport ...

https://github.com/wro4j/nashorn-backport/blob/master/src/jdk/nashorn/internal/parser/Lexer.java

2 along with this work; if not, write to the Free Software Foundation, ... import jdk. nashorn.internal.runtime.options.Options;. /**. * Responsible for converting source ... @return True if a literal beginning with startToken was found and scanned. */.

Removed APIs, Features, and Options

https://www.oracle.com/java/technologies/javase/9-removed-features.html

This document includes the identification of removed APIs and features not ... When the system property jdk.net.hosts.file is set, and the specified file doesn't exist, ... The possibility to provide provide subclasses of jdk.nashorn.internal. runtime.

Nashorn jsr223 engine notes - OpenJDK Wiki - Java.net

https://wiki.openjdk.java.net/display/Nashorn/Nashorn+jsr223+engine+notes

May 14, 2016 ... Nashorn script engine allows customization options via a System property ... If not found in any of the ScriptContext's Bindings, ReferenceError is thrown. ... objects created by script as instances of jdk.nashorn.internal.runtime.

Consolidated JDK 8 Release Notes

https://www.oracle.com/java/technologies/javase/8all-relnotes.html

BPR builds are available only as commercial offerings to Oracle customers. ... The security baselines for the Java Runtime Environment (JRE) at the time of the release ... It is not recommended that this JDK (version 8u291) be used after the next ... Nashorn ensures that internal JavaScript strings are converted to java. lang.