使用在tracemonkey、SquirrelFish Extreme 或V8 上运行的Javascript 调用Java 函数

发布于 2024-10-04 16:02:08 字数 181 浏览 0 评论 0原文

我想知道如何向我正在开发的 Java 应用程序添加 JS 支持。 唯一重要的是,最终 JS 将能够调用 Java 函数。

在网上搜索时,我发现tracemonkey、SquirrelFish Extreme 和V8 是最好的JavaScript 引擎,因此我更喜欢只使用它们(不包括Rhino)。

谢谢, 埃尔达德。

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 will 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凯凯我们等你回来 2024-10-11 16:02:09

Google V8 有 2 个与 JVM 的绑定,
并且它一直是当前JavaScript性能大战的煽动者和领导者。

当然,您仍然需要发布一个大型的特定于操作系统的 C++ 编译扩展
在您的 Java 应用程序中。但它确实有效。

有关详细信息,请参阅我的评论:

Javascript 引擎与 JVM 和 CLR 具有良好的互操作性

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

泛泛之交 2024-10-11 16:02:08

在网上搜索时,我发现tracemonkey、SquirrelFishExtreme和V8是最好的JavaScript引擎

但它们是C++,没有明显的Java 绑定。 Rhino 是我所知道的唯一具有 Java 绑定的 Javascript 解释器。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文