Testing and Deploying Your Application

Running locally

You run your application locally with the native development tools that you usually use.

For details, including specific commands depending on your plugin, see Local testing for the Java 8/Jetty 9 runtime or Local testing for the Java 8 runtime.

Deploying your application

Java provides several different tools to deploy to App Engine flexible environment. For command-line deployment, use the Maven or Gradle plugins. To deploy using an IDE, use the IntelliJ plugin.

Manually building a container for deployment

To build your container images outside of Google Cloud Platform, you must first upload your images to a container image repository before you can deploy your images to App Engine with the gcloud app deploy command.

For example, if you build your container images locally with Docker, you can push those images to Google Container Registry and then specify the URL of your image in the --image-url flag of the command:

gcloud app deploy --image-url gcr.io/[MY_PROJECT_ID]/[MY_CONTAINER_IMAGE]

Docker base images for Java

If you'd like to build a Java custom runtime application from scratch, you can use one of the following base images in a Dockerfile:

Runtime Docker command
Java 8 FROM gcr.io/google_appengine/openjdk
Java 8 / Jetty 9 FROM gcr.io/google-appengine/jetty

Viewing your application

After you deploy your app to App Engine, you can run the following command to launch your browser and view the app at http://[YOUR_PROJECT_ID].appspot.com:

gcloud app browse

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

App Engine flexible environment for Java docs