当我运行最近下载的 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/