无法为JavaScript创建Javax脚本引擎 - 使用ANT命令(MAC OS)时
我正在尝试在终端(Mac OS)的项目目录中运行ant Refresh_test_db
命令。 我最终出现以下错误:
[echo] billing.dir has been set to ../billing
Java 15 has removed Nashorn, you must provide an engine for running JavaScript yourself. GraalVM JavaScript currently is the preferred option.
BUILD FAILED
/Users/ygupta/database/build.xml:20: Unable to create javax script engine for javascript
我知道当我们使用Java 15或更高的Java时,通常会弹出此错误(此处检查了其他答案)。但是,当我检查我的Java版本时:
ygupta@ygupta-macOS ~ % java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)
仅是Java 8。我是新手,有人可以帮我吗?
I am trying to run the ant refresh_test_db
command in my project directory in the terminal (Mac OS).
I end up with the following error:
[echo] billing.dir has been set to ../billing
Java 15 has removed Nashorn, you must provide an engine for running JavaScript yourself. GraalVM JavaScript currently is the preferred option.
BUILD FAILED
/Users/ygupta/database/build.xml:20: Unable to create javax script engine for javascript
I know this error usually pops up when we are using Java 15 or higher (checked other answers here). But when I check my Java version:
ygupta@ygupta-macOS ~ % java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)
It's Java 8 only. I am new to this, can someone please help me on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论