Stay organized with collectionsSave and categorize content based on your preferences.
You must upgrade your applications to thelatest supported runtime versionto continue receiving security updates
and be eligible for technical support.
The process of upgrading an existing app depends on the runtime version that
your app currently uses:
Java 8: You must migrate your app to thelatest supported Java version. Java 8 has reachedend of supporton January 31,2024. Your
existing Java 8 applications will continue to run and receive traffic. However,
you cannot deploy new or update existing applications that use runtimesafter their end of support date.
Java second-generation runtimes (after end of support): To upgrade to asupported version of Java,
do the following:
Update theapp.yamlfile by specifying a version of Java that you want your
app to run. For example:
runtime:javaVERSION
WhereVERSIONis theMAJORversion number.
For example, to use the latest Java version, Java 21,
specify21.
For more information, see theJava runtime overview.
If you use legacy bundled services, you must upgrade your apps to run
on either:
Java Enterprise Edition 10 (EE10 - default, recommended): Java EE10
does not supportjavax.servlet.*APIs and requires you to update
your apps and third-party dependencies to use newer Java artifacts
like theJakartanamespace.
Java Enterprise Edition 8 (EE8): Java EE8 lets you usejavax.servlet.*APIs, but you must make minor configuration changes
to yourappengine-web.xmlfile.
App Engine supports this version. To continue to upgrade to the
latest support version, do the following:
Update theapp.yamlfile by specifying a version of Java that you want your
app to run. For example:
runtime:javaVERSION
WhereVERSIONis theMAJORversion number.
For example, to use the latest Java version, Java 21,
specify21.
For more information, see theJava runtime overview.
If you use legacy bundled services, you must upgrade your apps to run
on either:
Java Enterprise Edition 10 (EE10 - default, recommended): Java EE10
does not supportjavax.servlet.*APIs and requires you to update
your apps and third-party dependencies to use newer Java artifacts
like theJakartanamespace.
Java Enterprise Edition 8 (EE8): Java EE8 lets you usejavax.servlet.*APIs, but you must make minor configuration changes
to yourappengine-web.xmlfile.
Refer to the following table to understand which Java versions are compatible
with your versions of servlet:
Enterprise Edition (EE)
Java version
Servlet
Compatibility
EE7
11
2.5 or 3.1
There is no community support for EE7. Java 11 has reachedend of support. We recommend that you upgrade your app to use thelatest version of Java.
EE7
17
2.5 or later
There is no community support for EE7. We recommend that you upgrade your app to use EE8.
EE8
17/21
2.5 and later
Java EE8 is backward compatible with Java EE6 and later. For more information, seeUpgrade to Java 21 on EE8.
EE10
17/21
6.0 (recommended). Java 21 is configured to run EE10 by default.
To use Java EE10, you must update your application servlets and dependencies to include theJakartanamespace. For more information, seeUpgrade Java 21 on EE10.
Upgrade to Java 21 on EE10
To use Java 21 onEnterprise Edition 10 (EE10),
you must upgrade your application servlets and dependencies in your Maven and Gradle
files to include theJakartanamespace:
Change the version number in yourweb.xmlconfiguration file toversion=6.0. For example:
Optional: Java 21 includes support for virtual threads. To enable
virtual threads, you add theappengine.use.virtualthreadsproperty within thesystem-propertiestag
in yourappengine-web.xmlfile.
Upgrade to Java 17 or 21 on EE8
You can continue usingjavax.servlet.*APIs on Java EE8 without major application
configuration changes, because EE8 offers backward compatibility for Java EE6
and later. To run your applications on Java EE8, you must declare a newsystem-propertiestag in yourappengine-web.xmlfile with the non-defaultapp.engine.use.EE8configuration:
Optional: Java 21 includes support for virtual threads. To enable
virtual threads, you add theappengine.use.virtualthreadsproperty
within thesystem-propertiestag. Example:<property name="appengine.use.virtualthreads" value="true"/>
[[["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\u003eApplications must be upgraded to the latest supported Java runtime version to receive security updates and technical support.\u003c/p\u003e\n"],["\u003cp\u003eJava 8 applications have reached end of support and while they will continue to run, new deployments or updates to Java 8 applications are not permitted.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading to a supported Java version involves updating the \u003ccode\u003eapp.yaml\u003c/code\u003e file to specify the desired Java version, such as Java 21, by using the \u003ccode\u003eruntime: javaVERSION\u003c/code\u003e configuration.\u003c/p\u003e\n"],["\u003cp\u003eIf using legacy bundled services, applications must be upgraded to either Java Enterprise Edition 10 (EE10), which requires using the \u003ccode\u003eJakarta\u003c/code\u003e namespace, or Java Enterprise Edition 8 (EE8), which requires minor \u003ccode\u003eappengine-web.xml\u003c/code\u003e configuration changes to use \u003ccode\u003ejavax.servlet.*\u003c/code\u003e APIs.\u003c/p\u003e\n"],["\u003cp\u003eJava 21 supports virtual threads, which can be enabled by adding the \u003ccode\u003eappengine.use.virtualthreads\u003c/code\u003e property in the \u003ccode\u003eappengine-web.xml\u003c/code\u003e file.\u003c/p\u003e\n"]]],[],null,["# Upgrade an existing application\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nYou must upgrade your applications to the [latest supported runtime version](/appengine/docs/standard/lifecycle/support-schedule#java) to continue receiving security updates\nand be eligible for technical support.\n\nThe process of upgrading an existing app depends on the runtime version that\nyour app currently uses:\n\n- **Java 8** : You must migrate your app to the [latest supported Java version](/appengine/docs/standard/lifecycle/support-schedule#java). Java 8 has reached [end of support](/appengine/docs/standard/lifecycle/runtime-lifecycle#end_of_support) on January 31,2024. Your\n existing Java 8 applications will continue to run and receive traffic. However,\n you cannot deploy new or update existing applications that use runtimes [after their end of support date](/appengine/docs/standard/lifecycle/support-schedule#java).\n\n- **Java second-generation runtimes (after end of support)** : To upgrade to a\n [supported version of Java](/appengine/docs/standard/lifecycle/support-schedule#java),\n do the following:\n\n - Update the `app.yaml` file by specifying a version of Java that you want your\n app to run. For example:\n\n runtime: java\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e\n\n Where \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e is the `MAJOR` version number.\n For example, to use the latest Java version, Java 21,\n specify `21`.\n For more information, see the\n [Java runtime overview](/appengine/docs/standard/java-gen2/runtime).\n - If you use legacy bundled services, you must upgrade your apps to run\n on either:\n\n - Java Enterprise Edition 10 (EE10 - default, recommended): Java EE10\n does not support `javax.servlet.*` APIs and requires you to update\n your apps and third-party dependencies to use newer Java artifacts\n like the `Jakarta` namespace.\n\n - Java Enterprise Edition 8 (EE8): Java EE8 lets you use `javax.servlet.*`\n APIs, but you must make minor configuration changes\n to your `appengine-web.xml` file.\n\n See [Upgrade to Java 21 for legacy bundled services](#update_for_bundled_services) for all options.\n- **Java 17**:\n\n App Engine supports this version. To continue to upgrade to the\n latest support version, do the following:\n - Update the `app.yaml` file by specifying a version of Java that you want your\n app to run. For example:\n\n runtime: java\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e\n\n Where \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e is the `MAJOR` version number.\n For example, to use the latest Java version, Java 21,\n specify `21`.\n For more information, see the\n [Java runtime overview](/appengine/docs/standard/java-gen2/runtime).\n - If you use legacy bundled services, you must upgrade your apps to run\n on either:\n\n - Java Enterprise Edition 10 (EE10 - default, recommended): Java EE10\n does not support `javax.servlet.*` APIs and requires you to update\n your apps and third-party dependencies to use newer Java artifacts\n like the `Jakarta` namespace.\n\n - Java Enterprise Edition 8 (EE8): Java EE8 lets you use\n `javax.servlet.*` APIs, but you must make minor configuration changes\n to your `appengine-web.xml` file.\n\n See [Upgrade to Java 21 for legacy bundled services](#update_for_bundled_services) for all options.\n\nUpgrade to Java 21 for legacy bundled services\n----------------------------------------------\n\n| **Important:** The `javax.servlet.*` APIs reached the [end of community support](https://github.com/jetty/jetty.project/issues/7958). We recommend that you update to [EE10](#ee10).\n\n### Java runtime compatibility\n\nRefer to the following table to understand which Java versions are compatible\nwith your versions of servlet:\n\n### Upgrade to Java 21 on EE10\n\nTo use Java 21 on [Enterprise Edition 10 (EE10)](https://jakarta.ee/release/10/),\nyou must upgrade your application servlets and dependencies in your Maven and Gradle\nfiles to include the `Jakarta` namespace:\n\n1. Change the version number in your `web.xml` configuration file to `version=6.0`. For example:\n\n \u003cweb-app xmlns=\"https://jakarta.ee/xml/ns/jakartaee\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:schemaLocation=\"https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd\"\n version=\"6.0\"\u003e\n ...\n \u003c/web-app\u003e\n\n2. Rename your application servlets and dependencies from `javax.servlet.*` to\n `jakarta.servlet.*`:\n\n import jakarta.servlet.ServletException;\n import jakarta.servlet.annotation.WebServlet;\n import jakarta.servlet.http.Cookie;\n import jakarta.servlet.http.HttpServlet;\n import jakarta.servlet.http.HttpServletRequest;\n import jakarta.servlet.http.HttpServletResponse;\n\n @WebServlet(name = \"viewer\", urlPatterns = {\"/view\"})\n public class MyServlet extends HttpServlet {\n ......\n\n3. Update your remaining application third-party dependencies to newer Java artifacts\n depending on the `Jakarta` namespace.\n\n4. Add the following system property in your [`appengine-web.xml`](/appengine/docs/standard/java-gen2/config/appref-xml#system_properties) file:\n\n \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n \u003cappengine-web-app xmlns=\"http://appengine.google.com/ns/1.0\"\u003e\n \u003cruntime\u003ejava21\u003c/runtime\u003e \u003c!-- or java17 --\u003e\n \u003csystem-properties\u003e\n \u003cproperty name=\"appengine.use.EE10\" value=\"true\"/\u003e\n \u003c/system-properties\u003e\n \u003capp-engine-apis\u003etrue\u003c/app-engine-apis\u003e\n \u003c/appengine-web-app\u003e\n\n5. Optional: Java 21 includes support for virtual threads. To enable\n virtual threads, you add the\n `appengine.use.virtualthreads` property within the `system-properties` tag\n in your [`appengine-web.xml`](/appengine/docs/standard/java-gen2/config/appref-xml#system_properties)\n file.\n\n### Upgrade to Java 17 or 21 on EE8\n\nYou can continue using `javax.servlet.*` APIs on Java EE8 without major application\nconfiguration changes, because EE8 offers backward compatibility for Java EE6\nand later. To run your applications on Java EE8, you must declare a new\n`system-properties` tag in your\n[`appengine-web.xml`](/appengine/docs/standard/java-gen2/config/appref-xml#system_properties)\nfile with the non-default `app.engine.use.EE8` configuration: \n\n \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n \u003cappengine-web-app xmlns=\"http://appengine.google.com/ns/1.0\"\u003e\n \u003cruntime\u003ejava21\u003c/runtime\u003e \u003c!-- or java17 --\u003e\n \u003csystem-properties\u003e\n \u003cproperty name=\"appengine.use.EE8\" value=\"true\"/\u003e\n \u003c/system-properties\u003e\n \u003capp-engine-apis\u003etrue\u003c/app-engine-apis\u003e\n \u003c/appengine-web-app\u003e\n\nOptional: Java 21 includes support for virtual threads. To enable\nvirtual threads, you add the `appengine.use.virtualthreads` property\nwithin the `system-properties` tag. Example:\n`\u003cproperty name=\"appengine.use.virtualthreads\" value=\"true\"/\u003e`"]]