Dojo not getting loaded into rhino emmbedded in java

谁都会走 提交于 2019-12-06 15:34:49

The code fails because of the way Dojo detects that it is running in the Rhino environment.

The Dojo code was written for compatibility with Rhino's shell (org.mozilla.javascript.tools.shell.Main) and detects Rhino by looking for features defined by org.mozilla.javascript.tools.shell.Global. If these are not present Dojo assumes it is running in a browser environment.

It is probably possible to emulate these features by defining them in your script engine but I haven't tried it.

I wrote a blog post on running Dojo in embedded Rhino but it doesn't use the ScriptEngine API.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!