开发者

Invoking Java function using Javascript runing on tracemonkey, SquirrelFish extreme or V8

I wonder how can I add JS support to the Java application I'm developing. The only thing that matter is that eventually, the JS w开发者_JAVA百科ill be able to invoke Java functions.

While searching the web, I've found that tracemonkey, SquirrelFish extreme and V8 are the best JavaScript engines and therefore I prefer using them only (and exclude Rhino).

Thanks, Eldad.


While searching the web, I've found that tracemonkey, SquirrelFish extreme and V8 are the best JavaScript engines

But they're C++ with no apparent Java bindings. Rhino is the only Javascript interpreter I'm aware of that has Java bindings.


Google V8 has 2 bindings to the JVM, and it has been the instigator and leader in JavaScript's current performance war.

Of course, you still need to ship a large OS-specific C++ compiled extension in your Java app. But it does work.

For details, see my comment in:

Javascript engine with good interoperability with JVM and CLR

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜