从JS到Java? [英] From JS to Java?

查看:90
本文介绍了从JS到Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道GWT可以在Java中编写代码,并将编译后的编译转换为JS。

另一种方式呢?有什么可以将JS翻译成Java代码? 你可能想看看 Rhino



来自他们的网站: p>


Rhino是完全用Java编写的JavaScript的开源实现。它通常嵌入到Java应用程序中以向最终用户提供脚本。它作为默认的Java脚本引擎嵌入在J2SE 6中。



I know GWT beeing able to code in Java and translate the cope on compilation to JS.

What about the other way around? Is there something that can translate JS to Java code?

解决方案

You may want to take a look at Rhino.

From their site:

Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users. It is embedded in J2SE 6 as the default Java scripting engine.

这篇关于从JS到Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆