IntelliJ IDEA 2016.2 Help

Getting Started with Google App Engine

IntelliJ IDEA lets you create Google App Engine projects and upload your applications to Google infrastructure.

Before you start

Before you start creating your Google App Engine project, make sure that the Google App Engine plugin is downloaded and enabled in IntelliJ IDEA.

Creating Google App Engine Project

  1. If no project is currently open in IntelliJ IDEA, click Create New Project on the Welcome screen. Otherwise, select File | New | Project.

    As a result, the New Project wizard opens.

  2. In the left-hand pane, select Java.
  3. In the right-hand pane, select your project SDK.
  4. Under Additional Libraries and Frameworks select Google App Engine.
    new_project_gae
    Note that the Web Application option will be selected automatically.
  5. In the Google App Engine SDK field, select the SDK you want to use. If the list is empty click Download link to download the latest Google App Engine SDK. If the field doesn't contain the SDK that you want, click browseButton and select the installation folder of the required Google App Engine SDK in the dialog that opens.
  6. Click Next.
  7. On the next page of the wizard, specify the name and location settings.
    For more information, see Project Name and Location or Module Name and Location.

    Click Finish.

    IntelliJ IDEA creates an empty Google App Engine project. Depending on the selected persistence type, IntelliJ IDEA generates persistence.xml for JPA or jdoconfig.xml for JDO and takes the required libraries from the App Engine SDK.

    gae_empty_project

Checking Project Structure

  1. On the main menu, select Project Structure | Modules.
    proj_struc_googleAppEngine
  2. Check settings for the Google App Engine facet to make sure everything was configured properly.

Running the Application

  1. Enter your code or (like in our case) you can modify the index.jsp file.
    index_jsp
  2. Press run icon to run the application.
    gae_run_app
  3. View the result in the default browser.
    gae_localhost_out

Debugging the Application

  1. On the main menu, select Run|Debug 'AppEngine Dev' or click the debug toolbar button.
  2. View the results in the Debugger tool window.
    gae_debug_app

Configuring Google App Account

  1. If you going to upload your application to the cloud or deploy the artifact on the cloud server, create an account at Google App Engine.
    gae_account
  2. Add the name of the created application to the web.xml file.
    gae_web_xml

Deploying Google App Engine Application

  1. On the main menu, select Tools | Upload App Engine Application.
    gae_upload_to_server
  2. In the dialog that opens specify the deployment configuration settings and click Run.
    gae_deployment_config_dialog
  3. During the deployment IntelliJ IDEA might prompt you for your Google Account credentials.
    IntelliJ IDEA displays the progress in the Application Servers tool window.
    gae_cloud_deployment
  4. View the result in your default browser.
    gae_deployment_result

Using Google App Engine Deployment

  1. Select Run | Edit Configurations.
  2. In the Run/Debug Configurations dialog, select add to add a new configuration.
  3. From the drop-down list select Google App Engine Deployment.
    gae_deployment_config
  4. On the right-hand side specify the Google App Engine Deployment settings and click OK.
    gae_run_debug_deployment
  5. The name of the configuration appears on the main tool bar, click run to start deploying.
    gae_server
    Note that the IntelliJ IDEA might ask for your Google Account password.
    gae_password
  6. IntelliJ IDEA displays the progress of deployment in the Application Servers tool window.
    gae_cloud_deployment
  7. Open Google App Engine page.
    gae_browser_app_overview
  8. On the Application Overview page, click Running next to your application name to see the result of your deployment.
    gae_browser_result
Last modified: 5 September 2016