'Create GWT project in Intellij IDE

I'm beginner in using IntelliJ IDEA IDE and I want to create a new GWT project. I have added the GWT plugin to IntelliJ IDEA and now and I want to create a project. I googled but I didn't find a helpful tutorials or examples. Did you have guys a helpful tutorials to start. Thanks in advance.



Solution 1:[1]

Do not use the GWT project builders from IntelliJ or Eclipse. Both generate projects which use the same class path for client and server. In todays GWT development it is common to use a separate class path for client and server.

Depending on the server you prefer to use, choose:

https://github.com/tbroyer/gwt-maven-archetypes

in case you want to use Jetty or Tomcat on the server side or:

https://github.com/NaluKit/gwt-maven-springboot-archetype

in case you want to use Spring Boot.

Solution 2:[2]

How to create a new GWT project in IntelliJ

  1. Create a new project: File ? New... ? Project...
  2. Select Java EE (Legacy).
  3. Select Java 8.
    • Do not use Java 9 or above unless you know what you're doing. Yes, GWT 2.8.2+ works with Java 11+, but you'll need to open some internal modules for it to work. If you just want to learn GWT, stay with Java 8.
  4. In Additional Libraries and Frameworks, check ? Google Web Toolkit.
  5. In GWT SDK, fill in the path to your GWT installation.
  6. Check ? Create sample application and introduce a fully qualified class name for the main class.

New Project Wizard

  1. Click Next, and fill in the rest of needed info for your new project (this has nothing to do with GWT).

You'll end up with something like this:

enter image description here

If you followed the steps closely, the sample project should be fully functional. IntelliJ should've created a Run configuration for you, too, so you can run the GWT app right away and see it in action:

enter image description here

This is all explained in the official help documentation for IntelliJ 2020.1, which was the last version to include GWT support out of the box.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 El Hoss
Solution 2