javascript - JMeter 警告 : Nashorn engine is planned to be removed from a future JDK release

标签 javascript java jmeter nashorn deprecation-warning

当我运行最近下载的 JMeter 5.1.1 时,我在终端窗口中看到很多次:

Warning: Nashorn engine is planned to be removed from a future JDK release

我使用网络搜索找到了 JEP 335: Deprecate the Nashorn JavaScript Engine .

Motivation

The Nashorn JavaScript engine was first incorporated into JDK 8 via JEP 174 as a replacement for the Rhino scripting engine. When it was released, it was a complete implementation of the ECMAScript-262 5.1 standard.

With the rapid pace at which ECMAScript language constructs, along with APIs, are adapted and modified, we have found Nashorn challenging to maintain.

我希望看到新引擎现在得到了更多的使用,但是没有,我找不到可以运行 JavaScript 的替代引擎。 JMeter 中的 JavaScript 会发生什么?它不会运行而我们鼓励使用Groovy

顺便说一句,如何从终端中删除该警告?

最佳答案

Groovy 是 encouraged在 JMeter 的最佳实践中

We advise using Apache Groovy

在新版本中 changes此警告有一个解决方法:

To silence these warnings, add -Dnashorn.args=--no-deprecation-warning to your Java arguments. That can be achieved by setting the enviroment variable JVM_ARGS

export JVM_ARGS="-Dnashorn.args=--no-deprecation-warning"

关于javascript - JMeter 警告 : Nashorn engine is planned to be removed from a future JDK release,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58416070/

相关文章:

jmeter - 我可以通过 JMeter 打开 Microsoft EDGE 吗?

javascript - 如何将两个数组组合为笛卡尔积?

javascript - HighchartsplotBands 不适用于 setExtremes 函数

javascript - 更改谷歌地图方向中的单个标记

javascript - ExtJS - 使用 RegEx 过滤缓冲存储

java - 减少方法中返回语句的数量

java - 如何检查数组中的每个变量,如果数组中的下一个元素正在增加?

具有返回类型的 Java 继承方法

string - 使用 JMeter 从响应 header 中提取位置

performance - 用JMeter记录移动IOS/Android应用的HTTPS请求