App Engine offers you a choice between two environments for Java applications: standard environment and flexible environment. Both environments have the same code-centric developer workflow, scale quickly and efficiently to handle increasing demand, and enable you to use Google's proven serving technology to build your web, mobile, and IoT applications quickly and with minimal operational overhead. While the available environments have a lot in common, they differ in a few important ways.

## Choose your preferred environment

### Standard environment

- Optimized to scale nearly instantaneously to handle huge traffic spikes.

- Most cost-effective for applications that have significant periods where they
  are not serving traffic.

- OpenJDK based Java runtime supports the standard public Java library.

- Doesn't impose a security manager--your code won't be restricted by Java
  permissions issues.

- [Free tier](https://cloud.google.com/appengine/pricing).

- Ubuntu OS

- The Java 8 runtime is [no longer supported](https://docs.cloud.google.com/appengine/docs/standard/lifecycle/support-schedule#java).

[Read docs](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/runtime)

### Flexible environment

- Full [open source](http://github.com/GoogleCloudPlatform/) language runtimes.

- Use any framework, library, or binary of your choice.

- Code is portable to anywhere that supports Docker containers.

- Most cost-effective for applications that serve traffic continuously.

- No free tier. Application always has a minimum number of running instances.
  Most cost-effective for applications that serve traffic continuously.

- Ubuntu OS

[Read docs](https://docs.cloud.google.com/appengine/docs/flexible/java/dev-jetty9)

## Choosing an environment


You can run an App Engine application in two environments, the
standard environment and the flexible environment. See a summary
of differences between the two environments.


[Learn more](https://docs.cloud.google.com/appengine/docs/the-appengine-environments)