0

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?

2
  • 1
    @jAndy that just patently false Commented Dec 8, 2012 at 14:31
  • 1
    But Rhino and Nashorn would both be serverside not client side be aware of that! On the other hand you could also see some samples for Rhino on Mozilla Developers site. But dont expect anything fancy like writing JavaScript on HTML page and converting it to Java. Tats never possible. Commented Dec 8, 2012 at 14:37

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

2

Aside from Rhino (by Mozilla) there is also Nashorn (by Oracle) (which btw. means "Rhino" in German), which is an official JS implementation in Java.

It will be available OpenSource with Java8 in 2013.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.