Does Google App Engine support Java 8?

前端 未结 13 2588
既然无缘
既然无缘 2020-12-05 17:43

Trying to get started with Google App Engine - does it work with Java 8?

I\'ve followed the instructions on this page: https://console.developers.google.com/start/ap

相关标签:
13条回答
  • 2020-12-05 18:11

    Java 8 is now generally available on App Engine Standard Environment, joining the GA runtime on the App Engine Flexible Environment.

    Learn about the differences.

    The new Java 8 runtime has all the benefits of Java 7 but with upgrades and enhancements:

    • OpenJDK 8-based Java runtime supports the standard public Java library (no whitelist)
    • Doesn't impose a security manager--your code won't be restricted by Java permissions issues.
    0 讨论(0)
  • 2020-12-05 18:14

    [The passage of time has changed the 'no' from this accepted answer to 'yes'. Please see others answers below.]

    Short answer, no. They will integrate it over time, but for now if you use it, it will cause you a lot of errors. I would recommend against it

    Also take note of user7610's answer below :). It is as of now the only way to have Java 8 on the Cloud Platform

    0 讨论(0)
  • 2020-12-05 18:15

    Update: it is available in the "standard" (sandboxed) offering since mid 2017, https://cloud.google.com/blog/products/gcp/java-8-on-app-engine-standard-environment-is-now-generally-available

    Before then, it was sort-of available, via Managed VMs. The idea is that you provide a Docker container with whatever software you need (like Java 8) and GAE will use that as your app instance VMs. You still get the autoscaling, monitoring and all that.

    The disadvantage of Managed VMSs is that you are charged as for the Compute Engine VMs. That means you pay by minute and there is no free quota. There is the $300 credit for new user accounts for 60 days, but after that you'd have to pay.

    0 讨论(0)
  • 2020-12-05 18:15

    App Engine Standard Java now supports Java8. See the Beta documentation at: Java8 on GAE Standard documentation

    Thanks

    0 讨论(0)
  • 2020-12-05 18:20

    yes it does. We just launched this to Beta and soon GA.

    https://cloudplatform.googleblog.com/2017/06/Google-App-Engine-standard-now-supports-Java-8.html

    0 讨论(0)
  • 2020-12-05 18:20

    It's not quite the same thing, but you can use Java 8 with the new App Engine "flexible environment". I don't think you can access App Engine APIs (such as the images service or task queues) but you'll be able to use services which live outside of App Engine, such as the Datastore and Pub/Sub.

    It's also worth bearing in mind that the service is currently in beta (so not covered by any SLAs). Also, the pricing is different; instead of using the normal App Engine pricing structure, it's based on usage of GCE virtual machines.

    0 讨论(0)
提交回复
热议问题