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