Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much of Java can I really use with GWT?

I'd like to learn GWT, and I like the fact that it compiles to Javascript. My question is, how much of Java I can really use with GWT? My guess would be that limitations apply mostly for client side, while on the server side I should be able to make use of any existing Java library, right? Or, will I be only able to use a small subset , because of the compilation to Javascript thing?

What are it's limitations? I am interested in what it's not able to do, or things that require too many workarounds to implement. I need to know if learning GWT is a good choice for a possible freelance carrier in web development.

like image 633
Geo Avatar asked Feb 04 '11 18:02

Geo


People also ask

Does GWT support Java 8?

GWT supports most of the core Java language syntax and semantics, but there are a few differences you will want to be aware of. GWT 2.8+ supports Java 8 syntax. (Previous versions supported lower Java versions, see the Release Notes for more information.)

What language is GWT client side code written in?

The GWT Web Toolkit, formerly known as Google Web Toolkit, is a set of development tools for building and optimizing complex browser-based applications using the Java programming language.


2 Answers

The GWT website has this documentation exactly to answer that question.

like image 124
Santa Avatar answered Oct 19 '22 07:10

Santa


See the JRE emulation docs. Those are the supported out of the box emulated classes that you can use.

"Google Web Toolkit includes a library that emulates a subset of the Java runtime library. The list below shows the set of JRE packages, types and methods that GWT can translate automatically. Note that in some cases, only a subset of methods is supported for a given type."

You can also provide your own emulation for other classes using <super-source/> in your gwt.xml to point to a package that will provide replacement Java classes for those that can't be directly compiled to JavaScript.

like image 26
Valdis R Avatar answered Oct 19 '22 09:10

Valdis R