📜 ⬆️ ⬇️

Install GWT

Now we will put a great framework GWT . This article does not pretend to originality, you can find many such articles, but I decided to write a step-by-step installation man, since my topic is first. You can write your applications in your favorite editor, but I decided that once there is an opportunity to tie gwt to such a wonderful development environment like Eclipse, then we will write and use it.

So what we need to get started:
1. Download GWT . 2. Download Eclipse . I downloaded the version of Eclipse Classic. 3. Making the whole thing work. In general, installing both GWT and Ecliplse doesn’t cause any problems - just unzip it in the right place and that’s it. Now we’ll tie GWT to Eclipse. First of all, you need to set the GWT_HOME variable. This is done simply - Main Menu => Windows => Preferences ... Then in the section Java => Build Path => Classpath Variables we create a new variable (New). We name it GWT_HOME and specify the folder where GWT was unpacked. That's all. Now you can create a project. It is made as easy as everything else. In general, the creation of the project comrades from Google divided into 2 parts: 1. Creating a project template. 2. Creating an application template. The first part is to simply go to the folder, unpacked the GWT folder and write in the console: projectCreator -eclipse MyFirstGWTApplication-out d: \ Projects \ MyFirstGWTApplication and then you will see a notification about the files created. Further on the second paragraph - without going anywhere we write: applicationCreator -eclipse MyFirstGWTApplication-out d: \ Projects \ MyFirstGWTApplication ru.habrahabr.client.MyFirstGWTApplication Once again, we see what was created there. If everything is good, then we further import the project into Eclipse: File => Import => General => Existing Project into Workspace Then everything is simple, if you are going to write alone, then nothing else needs to be done. If team development is envisaged, then it is worthwhile for the project to determine the location of the libraries through GWT_HOME, which we created at the very beginning. To do this, go: Project => Properties => Java Build Class => Libraries. We find there gwt-user.jar, we delete it. Then Click Add Variable => Select GWT_HOME => Click Extend ... => Select gwt-user.jar We save the whole thing. That's not all. Similarly, you should specify the Classpath for the project. Run => Open Debug Dialog => Java Application => MyFirstGWTApplication => Classpath => gwt-dev-wondows.jar => Remove => Advanced => Add Classpath Variables => GWT_HOME => Extend => gwt-dev-wondows. jar => Ok. Uff, now everything seems to be. Press Ctrl + F11 and see what happened. The application is simple. There may be problems with the encoding when using Cyrillic characters. It is solved by setting appropriate code pages for the Eclipse editor and for the project.

')

Source: https://habr.com/ru/post/40444/


All Articles