问题描述
最近我的一些用户报告了NullPointers的问题。感谢其中一个,我已经设法发现我的应用程序找不到理论上应该附带JRE的Javascript引擎(大多数都有JDK)。
Recently some of my users have been reporting problems with NullPointers. Thanks to one of them, I have managed to find out that my application can't find the Javascript engine that should theoretically come with the JRE (most of them have the JDK anyway).
他们如何手动安装脚本引擎?
How can they manually install the scripting engine?
提前致谢...
PS这些人大多数都有OpenJDK。但是,这不会发生在我身上(我也是一个OpenJDK用户)...
编辑:他们至少有1.5版本,其中大部分都有1.6。
P.S. Most of these people have OpenJDK. However, this doesn't happen to me (I am also an OpenJDK user)... They have at least version 1.5, most of them have 1.6.
推荐答案
来自(Java 6 SE规范):
From JSR 270 (the Java 6 SE spec):
因此,可以想象有没有JavaScript支持的JRE。引擎名称,语言名称和捆绑版本也可能有所不同。 JavaScript是Oracle的商标,因此某些供应商可能不愿意将其用作标识符字符串。
So, it is conceivable that there are JREs out there without JavaScript support. There may also be variations in engine names, language names and versions bundled. "JavaScript" is an Oracle trademark so some vendors might be reluctant to use it as an identifier string.
这篇关于找不到Javascript引擎 - 为Java平台编写脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!