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 applicationYou can use any of the supported tools to deploy your Java app to App Engine flexible environment. For command-line deployment, use gcloud app deploy from the Cloud SDK, or use the Maven or the Gradle plugins. To deploy using an IDE, use the IntelliJ or Eclipse plugins. To programmatically deploy your apps, use the Admin API.
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]
Using automated continuous deployment pipelines
You can use Container Builder to automate deployments in continuous deployment pipelines. For more information, see Deploying artifacts, and Automating Builds using Build Triggers in the Container Builder documentation.
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:
|Java 8 / Jetty 9||
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
gcloud app browse
The following is a common error message that you might encounter when deploying apps:
PERMISSION_DENIED: Operation not allowed
The "appengine.applications.create" permission is required.
- If the GCP project does not include the required
gcloud app deploycommand can fail when it tries to run the
gcloud app createcommand. Only accounts with Owner role have the necessary permissions to create App Engine applications.