A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/appengine/docs/standard/java-gen2/upgrade-java-runtime below:

Upgrade an existing application | Google App Engine standard environment docs

Skip to main content Upgrade an existing application

Stay organized with collections Save and categorize content based on your preferences.

You must upgrade your applications to the latest supported runtime version to 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:

Upgrade to Java 21 for legacy bundled services Important: The javax.servlet.* APIs reached the end of community support. We recommend that you update to EE10. Java runtime compatibility

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 reached end of support. We recommend that you upgrade your app to use the latest 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, see Upgrade 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 the Jakarta namespace. For more information, see Upgrade Java 21 on EE10. Upgrade to Java 21 on EE10

To use Java 21 on Enterprise Edition 10 (EE10), you must upgrade your application servlets and dependencies in your Maven and Gradle files to include the Jakarta namespace:

  1. Change the version number in your web.xml configuration file to version=6.0. For example:

        <web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
          version="6.0">
          ...
        </web-app>
    
  2. Rename your application servlets and dependencies from javax.servlet.* to jakarta.servlet.*:

         import jakarta.servlet.ServletException;
         import jakarta.servlet.annotation.WebServlet;
         import jakarta.servlet.http.Cookie;
         import jakarta.servlet.http.HttpServlet;
         import jakarta.servlet.http.HttpServletRequest;
         import jakarta.servlet.http.HttpServletResponse;
    
         @WebServlet(name = "viewer", urlPatterns = {"/view"})
         public class MyServlet extends HttpServlet {
        ......
    
  3. Update your remaining application third-party dependencies to newer Java artifacts depending on the Jakarta namespace.

  4. Add the following system property in your appengine-web.xml file:

     <?xml version="1.0" encoding="utf-8"?>
     <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
        <runtime>java21</runtime> <!-- or java17 -->
        <system-properties>
          <property name="appengine.use.EE10" value="true"/>
        </system-properties>
        <app-engine-apis>true</app-engine-apis>
     </appengine-web-app>
    
  5. Optional: Java 21 includes support for virtual threads. To enable virtual threads, you add the appengine.use.virtualthreads property within the system-properties tag in your appengine-web.xml file.

Upgrade to Java 17 or 21 on EE8

You can continue using javax.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 new system-properties tag in your appengine-web.xml file with the non-default app.engine.use.EE8 configuration:

   <?xml version="1.0" encoding="utf-8"?>
   <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
      <runtime>java21</runtime> <!-- or java17 -->
      <system-properties>
        <property name="appengine.use.EE8" value="true"/>
      </system-properties>
      <app-engine-apis>true</app-engine-apis>
   </appengine-web-app>

Optional: Java 21 includes support for virtual threads. To enable virtual threads, you add the appengine.use.virtualthreads property within the system-properties tag. Example: <property name="appengine.use.virtualthreads" value="true"/>

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["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-07 UTC."],[[["Applications must be upgraded to the latest supported Java runtime version to receive security updates and technical support."],["Java 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."],["Upgrading to a supported Java version involves updating the `app.yaml` file to specify the desired Java version, such as Java 21, by using the `runtime: javaVERSION` configuration."],["If using legacy bundled services, applications must be upgraded to either Java Enterprise Edition 10 (EE10), which requires using the `Jakarta` namespace, or Java Enterprise Edition 8 (EE8), which requires minor `appengine-web.xml` configuration changes to use `javax.servlet.*` APIs."],["Java 21 supports virtual threads, which can be enabled by adding the `appengine.use.virtualthreads` property in the `appengine-web.xml` file."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4