Skip to content

Commit

Permalink
Document another way to get back nashorn on jdk 15
Browse files Browse the repository at this point in the history
  • Loading branch information
FSchumacher committed Nov 28, 2020
1 parent 305ce7c commit 1c7a231
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion xdocs/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,28 @@ export JVM_ARGS="-Dnashorn.args=--no-deprecation-warning"
</li>

<li>
With Java 15 the JavaScript implementation <a href="https://openjdk.java.net/jeps/372">Nashorn has been removed</a>. To add back a JSR-223 compatible JavaScript engine, copy <a href="https://github.com/mozilla/rhino/releases/download/Rhino1_7_13_Release/rhino-engine-1.7.13.jar">rhino-engine-1.7.13.jar</a> into <code>$JMETER_HOME/lib/ext</code>.
With Java 15 the JavaScript implementation <a href="https://openjdk.java.net/jeps/372">Nashorn has been removed</a>. To add back a JSR-223 compatible JavaScript engine you have two options:
<dl>
<dt>Use Mozilla Rhino</dt>
<dd>Copy <a href="https://github.com/mozilla/rhino/releases/download/Rhino1_7_13_Release/rhino-engine-1.7.13.jar">rhino-engine-1.7.13.jar</a> into <code>$JMETER_HOME/lib/ext</code>.</dd>
<dt>Use OpenJDK Nashorn</dt>
<dd>
The OpenJDK Nashorn implementation comes as a module. To use it, you will have to download it and add it to the module path. A hacky way to download the version 15.0 and its dependencies and set the module path is outlined below:
<source>
mkdir lib/modules
pushd lib/modules
wget https://repo1.maven.org/maven2/org/openjdk/nashorn/nashorn-core/15.0/nashorn-core-15.0.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm/9.0/asm-9.0.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.0/asm-commons-9.0.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-util/9.0/asm-util-9.0.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.0/asm-tree-9.0.jar
wget https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.0/asm-analysis-9.0.jar
popd
export JVM_ARGS="--modulepath $PWD/lib/modules"
./bin/jmeter
</source>
</dd>
</dl>
</li>

</ul>
Expand Down

0 comments on commit 1c7a231

Please sign in to comment.