Does Google App Engine support Java 8?

前端 未结 13 2589
既然无缘
既然无缘 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:24

    Yes, using App Engine flexible environment. Here are the official docs: https://cloud.google.com/appengine/docs/flexible/java/

    And here is the github repo for this implementation: https://github.com/GoogleCloudPlatform/appengine-java-vm-runtime

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

    You can apparently use JDK8 to create JRE7 compatible byte code, and this seems to be what Google recommends: https://cloud.google.com/appengine/docs/standard/java/download

    -source 1.7 -target 1.7
    
    0 讨论(0)
  • 2020-12-05 18:27

    Not at the time of writing but you can keep track of the status in this issue:

    • Java 8 support: https://code.google.com/p/googleappengine/issues/detail?id=9537
    0 讨论(0)
  • 2020-12-05 18:32

    Add <runtime>java8</runtime> to your appengine-web.xml file.

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

    Yes, You can use flexible environment. and change setting of your app.yaml

    vm: true
    

    for more information study https://cloud.google.com/appengine/docs/flexible/

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

    If your interest is in using lambda expressions on Google App Engine, you could give Retrolambda a try. I haven't tried it yet, but it claims to backport Java 8 lambda expressions to Java 7.

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