Java 8 has reached end of support
and will bedeprecatedon January 31, 2026. After deprecation, you won't be able to deploy Java 8
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Java
8 applications will continue to run and receive traffic after theirdeprecation date. We recommend that
youmigrate to the latest supported version of Java.
Install and configure the App Engine plugin for Maven.
App Engine also provides plugins forGradle,IntelliJ IDEA, andEclipse,
but this guide demonstrates the Maven plugin.
Create a new App Engine project.
Give permission to Cloud Build to enable building and deploying
your app.
Set-Dappengine-versionto the most recent version of the App
Engine SDK for Java, andapplication-idto the ID of your
Google Cloud project.
Set-Djava8=trueto deploy the project in the Java 8 runtime.
Set-DCloudSDK_Tooling=trueto use gcloud CLI tooling.
When prompted to choose an archetype, choose the value2for the
App Engine skeleton archetype. This creates an empty project that contains
the required directory structure and files.
When prompted for version, pressENTERto select the default
most recent version.
When prompted toDefine value for property 'groupId', supply the desired namespace
for your app; for example,com.mycompany.myapp.
When prompted toDefine value for property 'artifactId', supply the project
name; for example,myapp.
When prompted toDefine value for property 'version', accept the default
value.
When prompted toDefine value for property 'package', supply your
preferred package name (or accept the default). The generated Java files will
have the package name you specify here.
When prompted to confirm your choices, accept the default value (Y).
Wait for the project to finish generating, then change directories to the
new project directory, for examplemyapp/.
Add the gcloud CLI-based plugin to your project'spom.xmlfile.
Specify the target Google Cloud Platform project ID and theservice and
versionin the plugin configuration.
Give permission to Cloud Build
When you deploy your app, App Engine uses Cloud Build to build the
app into a container and deploy the container to the runtime. Cloud Build
does not have permission to deploy Java 8 apps by default, so you need togive Cloud Build permission to
deploy appsin your project. The builds are created in the app's region.
What's next
Now that your development environment is set up, you can get started
developing and deploying Java apps to App Engine.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThis guide details how to set up a development environment for deploying Java 8 applications to the App Engine standard environment using Maven.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves installing the Java SE 8 SDK, the gcloud CLI, and the App Engine Java component, as well as configuring Maven.\u003c/p\u003e\n"],["\u003cp\u003eCreating a new App Engine project is achieved through Maven archetypes, where you'll set the application ID, choose the correct archetype, and define properties like group ID and project name.\u003c/p\u003e\n"],["\u003cp\u003eYou must also add the gcloud CLI-based plugin to the project's \u003ccode\u003epom.xml\u003c/code\u003e file and then configure it with your Google Cloud Platform project ID.\u003c/p\u003e\n"],["\u003cp\u003eCloud Build needs to be granted permission to deploy apps in order to successfully build and deploy Java 8 apps to App Engine.\u003c/p\u003e\n"]]],[],null,["# Getting Started: Setting Up Your Development Environment\n\nLearn how to set up your build environment for app development and deployment\nto the Java 8 runtime in the App Engine standard environment.\n\nThis guide will show you how to:\n\n- Install the [Google Cloud CLI](/sdk/docs/install).\n- Install and configure the App Engine plugin for Maven. App Engine also provides plugins for [Gradle](/appengine/docs/legacy/standard/java/using-gradle), [IntelliJ IDEA](/code/docs/intellij/create-standard), and [Eclipse](/eclipse/docs), but this guide demonstrates the Maven plugin.\n- Create a new App Engine project.\n- Give permission to Cloud Build to enable building and deploying your app.\n\nInstalling required SDKs\n------------------------\n\n1. If you haven't already installed Java SE 8 SDK,\n [install the Java SE 8 Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html).\n\n2. Install and initialize the latest version of the gcloud CLI.\n\n [Install and Initialize gcloud CLI](/sdk/docs)\n3. Install the App Engine Java component:\n\n gcloud components install app-engine-java\n\n4. Authorize your user account:\n\n gcloud auth application-default login\n\nConfiguring Maven in your development environment\n-------------------------------------------------\n\n1. [Download](http://maven.apache.org/download.cgi)\n Maven 3.5 or later from the Maven website.\n\n2. [Install](http://maven.apache.org/install.html)\n Maven 3.5 or later on your local machine.\n\n | **Note:** Linux users may need to download Maven instead of using `apt-get install` to install Maven.\n\nCreating a new App Engine project\n---------------------------------\n\nTo create an App Engine App:\n\n1. Create a new directory.\n\n2. Initialize the new project in the created directory:\n\n mvn archetype:generate -Dappengine-version=1.9.59 -Djava8=true -DCloudSDK_Tooling=true -Dapplication-id=your-app-id -Dfilter=com.google.appengine.archetypes:\n\n 1. Set `-Dappengine-version` to the most recent version of the App\n Engine SDK for Java, and `application-id` to the ID of your\n Google Cloud project.\n\n 2. Set `-Djava8=true` to deploy the project in the Java 8 runtime.\n\n 3. Set `-DCloudSDK_Tooling=true` to use gcloud CLI tooling.\n\n3. When prompted to choose an archetype, choose the value `2` for the\n App Engine skeleton archetype. This creates an empty project that contains\n the required directory structure and files.\n\n4. When prompted for version, press \u003ckbd\u003eENTER\u003c/kbd\u003e to select the default\n most recent version.\n\n5. When prompted to `Define value for property 'groupId'`, supply the desired namespace\n for your app; for example, `com.mycompany.myapp`.\n\n6. When prompted to `Define value for property 'artifactId'`, supply the project\n name; for example, `myapp`.\n\n7. When prompted to `Define value for property 'version'`, accept the default\n value.\n\n8. When prompted to `Define value for property 'package'`, supply your\n preferred package name (or accept the default). The generated Java files will\n have the package name you specify here.\n\n9. When prompted to confirm your choices, accept the default value (`Y`).\n\n10. Wait for the project to finish generating, then change directories to the\n new project directory, for example `myapp/`.\n\n11. Add the gcloud CLI-based plugin to your project's `pom.xml` file.\n\n \u003cbuild\u003e\n \u003cplugins\u003e\n [...]\n \u003cplugin\u003e\n \u003cgroupId\u003ecom.google.cloud.tools\u003c/groupId\u003e\n \u003cartifactId\u003eappengine-maven-plugin\u003c/artifactId\u003e\n \u003cversion\u003e2.4.4\u003c/version\u003e\n \u003cconfiguration\u003e\n \u003cprojectId\u003eyour-project-ID-goes-here\u003c/projectId\u003e\n \u003cversion\u003e1\u003c/version\u003e\n \u003c/configuration\u003e\n \u003c/plugin\u003e\n [...]\n \u003c/plugins\u003e\n \u003c/build\u003e\n\n12. Specify the target Google Cloud Platform project ID and the [service and\n version](/appengine/docs/legacy/standard/java/an-overview-of-app-engine#versions_and_instances)\n in the plugin configuration.\n\nGive permission to Cloud Build\n------------------------------\n\nWhen you deploy your app, App Engine uses Cloud Build to build the\napp into a container and deploy the container to the runtime. Cloud Build\ndoes not have permission to deploy Java 8 apps by default, so you need to\n[give Cloud Build permission to\ndeploy apps](/build/docs/securing-builds/set-service-account-permissions#granting_additional_access)\nin your project. The builds are created in the app's region.\n\nWhat's next\n-----------\n\nNow that your development environment is set up, you can get started\ndeveloping and deploying Java apps to App Engine.\n\n- [Serving Static Content](/appengine/docs/legacy/standard/java/building-app/static-content)\n- [Handling Form Data](/appengine/docs/legacy/standard/java/building-app/handling-form-data)\n- [Using Cloud SQL](/appengine/docs/legacy/standard/java/building-app/cloud-sql)\n- [Executing Code Asynchronously](/appengine/docs/legacy/standard/java/building-app/taskqueues)"]]