com.google.appengine
appengine-api-1.0-sdk
4.0.2
jakarta.servlet
jakarta.servlet-api
6.1.0
provided
...
```
* Java 21/25 with javax EE8 profile appengine-web.xml
```
java25 <-- or java21-->
true
```
- [Public Java 17/21/25 Documentation](https://cloud.google.com/appengine/docs/standard/java-gen2/runtime)
- [How to upgrade to Java21/25](https://cloud.google.com/appengine/docs/standard/java-gen2/upgrade-java-runtime)
* Java 17 appengine-web.xml
```
java17
true
```
* Java 21 appengine-web.xml (will default to EE10, but EE8 possible)
```
java21
true
```
* Java 25 appengine-web.xml (will default to EE11, but EE8 possible)
```
java25
true
```
### App Engine Java Remote APIs
Source code for remote APIs for App Engine.
- [Public Documentation](https://cloud.google.com/appengine/docs/standard/java/tools/remoteapi)
- [Latest javadoc.io Javadocs from this repository](https://javadoc.io/doc/com.google.appengine/appengine-remote-api)
- [Public Sample remote server](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/appengine-java8/remote-server)
- [Public Sample remote client](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/appengine-java8/remote-client)
- [Source Code](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/remoteapi)
* Servlet web.xml
```
Remote API Servlet
RemoteApiServlet
com.google.apphosting.utils.remoteapi.RemoteApiServlet
1
RemoteApiServlet
/remote_api
```
* Servlet jakarta EE10 and EE11 web.xml
```
Remote API Servlet
RemoteApiServlet
com.google.apphosting.utils.remoteapi.JakartaRemoteApiServlet
1
RemoteApiServlet
/remote_api
```
* Maven javax and jakarta API pom.xml
```
com.google.appengine
appengine-remote-api
4.0.2
```
#### User Visible Changes With Maven Builds
We moved `com.google.appengine.api.memcache.stdimpl` and its old dependency
`javax.cache` from `appengine-api-1.0-sdk.jar` to a new jar `appengine-api-legacy.jar`.
- [Latest javadoc.io Javadocs from this repository](https://javadoc.io/doc/com.google.appengine/appengine-api-legacy)
Users who depend on the
moved classes will need to also include `appengine-api-legacy.jar` when
they build/deploy. Separating these classes allows
`appengine-api-1.0-sdk` users to choose any version of `javax.cache`
rather than being constrained by an obsolete included version.
* Maven pom.xml
```
com.google.appengine
appengine-api-legacy.jar/artifactId>
4.0.2
```
### Local Unit Testing for Java 17, 21, 25
- [Code Sample](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/unittests)
- [Latest javadoc.io Javadocs from this repository](https://javadoc.io/doc/com.google.appengine/appengine-testing)
* Maven pom.xml
```
com.google.appengine
appengine-testing
4.0.2
test
com.google.appengine
appengine-api-stubs
4.0.2
test
com.google.appengine
appengine-tools-sdk
4.0.2
test
```
### App Engine Java local development implementation of the APIs
Implementation of all the App Engine APIs for local environment (devappserver)
and local testing of an application before deployment.
- [Public Documentation][ae-docs]
- [Source Code](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/api_dev)
- [Source Code for repackaged APIs stubs jar](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/appengine-api-stubs)
### App Engine Java various local development utilities and devappserver
Source code for the App Engine local dev application server and local utilities.
- [Public Documentation](https://cloud.google.com/appengine/docs/standard/java/tools/using-local-server)
- [Source Code for tools APIs (appcfg)](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/lib/tools_api)
- [Source Code for XML validator (appcfg)](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/lib/xml_validator)
- [Source Code for local devappserver](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/runtime/local)
- [Source Code for shared utilities (appcfg)](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/shared_sdk)
- [Source Code for shared utilities (config)](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/utils)
### App Engine Java production runtime execution environment
Source code for the App Engine production application server and utilities. It is based on the Jetty9.4 Web Server.
- [Public Documentation][ae-docs]
- [Source Code for the runtime implementation](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/runtime/impl)
- [Source Code for the Java Main](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/runtime/main)
- [End-to-End test Web Applications](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/runtime/testapps)
- [End-to-End tests](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/runtime/test)
- [Source Code for runtime utilities](https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/master/runtime/util)
## Default entrypoint used by Java17, Java21 and Java25
The Java 17, Java 21 and 25 runtimes can benefit from extra user configuration when starting the JVM for web apps.
The default entrypoint used to boot the JVM is generated by App Engine Buildpacks.
Essentially, it is equivalent to define this entrypoint in the `appengine-web.xml` file. For example:
java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED -showversion -Xms32M -Xmx204M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -Dclasspath.runtimebase=/base/java_runtime -Djava.class.path=/base/java_runtime/runtime-main.jar -Djava.library.path=/base/java_runtime: com/google/apphosting/runtime/JavaRuntimeMainWithDefaults --fixed_application_path=/workspace /base/java_runtime
We do not recommend changing this default entrypoint as the memory settings are calculated based on the instance type (F1, F2, F4) and memory available.
By default, we use `--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED` to open some necessary JDK APIs.
## Entry Point Features
The entry point for the Java 17, Java 21, 25 runtimes can be customized with user-defined environment variables added in the `appengine-web.xml` configuration file.
The following table indicates the environment variables that can be used to enable/disable/configure features, and the default values if they are not set:
| Env Var | Description | Type | Default |
|-------------------|----------------------|----------|---------------------------------------------|
| `CPROF_ENABLE` | Stackdriver Profiler | boolean | `false` |
| `GAE_MEMORY_MB` | Available memory | size | Set by GAE or `/proc/meminfo`-400M |
| `HEAP_SIZE_RATIO` | Memory for the heap | percent | 80 |
| `HEAP_SIZE_MB` | Available heap | size | `${HEAP_SIZE_RATIO}`% of `${GAE_MEMORY_MB}` |
| `JAVA_HEAP_OPTS` | JVM heap args | JVM args | `-Xms${HEAP_SIZE_MB}M -Xmx${HEAP_SIZE_MB}M` |
| `JAVA_GC_OPTS` | JVM GC args | JVM args | `-XX:+UseG1GC` plus configuration |
| `JAVA_USER_OPTS` | JVM other args | JVM args | |
| `JAVA_OPTS` | JVM args | JVM args | See below |
If not explicitly set, `JAVA_OPTS` is defaulted to:
```
JAVA_OPTS:=-showversion \
${DBG_AGENT} \
${PROFILER_AGENT} \
${JAVA_HEAP_OPTS} \
${JAVA_GC_OPTS} \
${JAVA_USER_OPTS}
```
When `CPROF_ENABLE` is true, the default entrypoint adds the `PROFILER_AGENT` as:
`-agentpath:/opt/cprof/profiler_java_agent.so=--logtostderr`
For example, if your application code needs more `-add-opens` flags, you can use the `JAVA_USER_OPTS` environment variable defined in the `appengine-web.xml` file:
```
```
**Note:**
* Only one of `appengine.use.EE8`, `appengine.use.EE10`, or `appengine.use.EE11` can be set to `true` at a time.
* Flags can be set in `WEB-INF/appengine-web.xml` or via Java system properties (e.g., `-Dappengine.use.EE10=true`). System properties override `appengine-web.xml`.
* EE6 = Servlet 3.1 (`javax.*`), EE8 = Servlet 4.0 (`javax.*`), EE10 = Servlet 5.0 (`jakarta.*`), EE11 = Servlet 6.0 (`jakarta.*`).
* Jetty 12.1 should be fully backward compatible with Jetty 12.0 and EE11 version should also be backward compatible with EE10.
* EE8 should also be backward compatible with EE6.
### Java 17 (`java17`)
| Flag(s) Set in `appengine-web.xml` or System Properties | Resulting Jetty | Support | Resulting EE Version | Notes |
| :--- | :--- | :--- | :--- | :--- |
| _None (default)_ | 9.4 | GA | 6 | |
| `appengine.use.EE8=true` | 12.0 | GA | 8 | |
| `appengine.use.EE10=true` | 12.0 | GA | 10 | |
| `appengine.use.EE8=true`, `appengine.use.jetty121=true` | 12.1 | Early Access | 8 | |
| `appengine.use.EE10=true`, `appengine.use.jetty121=true` | 12.1 | Early Access | 11 | **Upgraded**: EE10 is upgraded to EE11 on Jetty 12.1 |
| `appengine.use.EE11=true` | 12.1 | Early Access | 11 | `appengine.use.jetty121=true` is used automatically |
##
### Java 21 (`java21`)
| Flag(s) Set in `appengine-web.xml` or System Properties | Resulting Jetty | Support | Resulting EE Version | Notes |
| :--- | :--- | :--- | :--- | :--- |
| _None (default)_ | 12.0 | GA | 10 | |
| `appengine.use.EE8=true` | 12.0 | GA | 8 | |
| `appengine.use.EE10=true` | 12.0 | GA | 10 | |
| `appengine.use.jetty121=true` | 12.1 | Early Access | 11 | If no EE flag is set, `jetty121` defaults to EE11 |
| `appengine.use.EE8=true`, `appengine.use.jetty121=true` | 12.1 | Early Access | 8 | |
| `appengine.use.EE10=true`, `appengine.use.jetty121=true` | 12.1 | Early Access | 11 | **Upgraded**: EE10 is upgraded to EE11 on Jetty 12.1 |
| `appengine.use.EE11=true` | 12.1 | Early Access | 11 | `appengine.use.jetty121=true` is used automatically |
##
### Java 25 (`java25`)
| Flag(s) Set in `appengine-web.xml` or System Properties | Resulting Jetty | Support | Resulting EE Version | Notes |
| :--- | :--- | :--- | :--- | :--- |
| _None (default)_ | 12.1 | Early Access | 11 | `appengine.use.jetty121=true` is used |
| `appengine.use.EE8=true` | 12.1 | Early Access | 8 | `appengine.use.jetty121=true` is used |
| `appengine.use.EE11=true` | 12.1 | Early Access | 11 | `appengine.use.jetty121=true` is used |
| `appengine.use.EE10=true` | **ERROR** | Unsupported | **ERROR** | EE10 is not supported, use compatible version EE11 instead|
##
## Contributing
Check out the [contributing guide](CONTRIBUTING.md) to learn how you can report issues and help make changes.
Always be sure to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.appengine/appengine-api-1.0-sdk.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.appengine%20AND%20a:appengine-api-1.0-sdk&core=gav