Use the following steps to set up your local environment for developing and deploying your App Engine services:
Install the latest release of Java.
See Java runtime environment for a list of the supported versions.
Install and initialize the gcloud CLI for deploying and managing your apps. If you already have the gcloud CLI installed and initialized, run the
gcloud components update
command to update to the latest release.By downloading, you agree to be bound by the Terms that govern use of the gcloud CLI for App Engine.
Install the gcloud component that includes the App Engine extension for Java 11/17. If you used the
apt
oryum
package managers to install the gcloud CLI, use those same package managers to install the gcloud component.Otherwise, use the following command:
gcloud components install app-engine-java
Optional tools:
-
Install Git for access to code, samples, libraries, and tools in the Google Cloud GitHub repository.
Install Java 11/17 tools. You can use the Maven or Gradle plugins to build, deploy, and manage your Java 11/17 services:
- Apache Maven and the App Engine Plugin
Gradle and the App Engine Plugin
Note that you must also configure access for Cloud Build.
When you deploy your services, Cloud Build is used to build each service into a container before that container is deployed to App Engine. Cloud Build does not have permission to deploy Java 11/17 apps by default. After you create you Google Cloud project so you need to give Cloud Build permission to deploy your services to your Google Cloud project. Note that Cloud Build builds each container in the region where you create your project.