views:

74

answers:

3

Is there a tool to convert javascript to java, so I can handle the project using GWT?

update

For those who don't know, GWT (Google Web Toolkit) is a toolkit to write Java and get Javascript, so my question.

A: 

I'm gonna go with a simple "no"

JavaScript and Java are so completely different that I can't imagine there'd be one.

Ryan Kinal
+6  A: 

What exactly do you have in mind? If you're looking for some sort of automatic tool, that generates GWT Java code from Javascript, then I'm afraid there's no such thing.

You can (and should) use JavaScript Native Interface (JSNI), probably in combination with JavaScript Overlay Types (JSO) to wrap your existing Javascript code, so that it's possible to interface with it from GWT's Java code. See the Getting to really know GWT, Part 1: JSNI (and Part 2) post on GWT's offcial blog for some pointers and use cases.

Igor Klimer
+1  A: 

Ask Google how they do that... Just joke :)

If seriously I have not heard about such open common tool for interpreting Javascript to Java...

Andriy Sholokh