Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT: Difference between gwt-user.jar and gwt-dev.jar?

Tags:

What is the difference between gwt-user.jar and gwt-dev.jar? Looking at their contents, I cannot see why they are packaged as they are.

I am wondering especially how to use the two JARs for compilation and deployment.
Which of the two do I need ...

  1. ... for running javac (.java to .class)?
  2. ... for running the GWT compiler (.class to JavaScript)?
  3. ... for running GWT development mode and debugging?
  4. ... for deploying my app to Google App Engine?
  5. ... to have in my Eclipse project's classpath?

Any clarification on these uses or, even better, an explanation of why that is, would be greatly appreciated.

like image 719
barfuin Avatar asked Jan 10 '12 21:01

barfuin


People also ask

Is GWT still supported?

Officially, support is dropped for running the GWT compiler or server-side tooling on Java 7. The GWT distribution is still compiled to run on Java 7 for this release, but no guarantees are made about whether or not this will work. Future versions will compile bytecode for Java 8+.

What is the latest version of GWT?

The latest GWT release is 2.9. 0.

Does GWT support Java 8?

Language support. 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.


1 Answers

gwt-user.jar contains the GWT api which you will interface directly with.

gwt-dev.jar contains code for gwt compiler, development/hosted mode etc.

for running javac (.java to .class)?

I assume you just mean to resolve references in which case gwt-user.jar

for running the GWT compiler (.class to JavaScript)?

gwt-dev.jar as well as gwt-user.jar for dependency resolution

for running GWT development mode and debugging?

again gwt-dev.jar contains everything to actually run development mode, but your code will be making use of gwt-user.jar here as well

for deploying my app to Google App Engine?

this is handled by the Google Eclipse Plugin and neither of these jars. If you are doing this via some other method though you should have no need for deploying either of these jar files to App Engine

to have in my Eclipse project's classpath?

your eclipse project should just need gwt-user.jar

One jar you have not mentioned is the gwt-servlet.jar if you are planning to do any server side communication you will also need this as a project dependency in your eclipse project.

Making use of the GWT Eclipse plugin will take care of a lot of these dependencies for you.

like image 122
Terrell Plotzki Avatar answered Sep 19 '22 12:09

Terrell Plotzki