| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This is a repository that contains Java code samples for Google App Engine standard Java 11 environment.
These samples use the Apache Maven build system. Before getting started, be sure to download and install it. When you use Maven as described here, it will automatically download the needed client libraries.
If you haven't already created a project, create one now. Projects enable you to manage all Google Cloud Platform resources for your app, including deployment, access control, billing, and services.
To switch to an Open JDK 11 in a Cloud shell session, you can use:
sudo update-alternatives --config java # And select the usr/lib/jvm/java-11-openjdk-amd64/bin/java version. # Also, set the JAVA_HOME variable for Maven to pick the correct JDK: export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
To migrate to the Java 11 runtime, your application must have a Main class that starts a web server. appengine-simple-jetty-main is a shared artifact that provides a Jetty Web Server for the servlet based runtime. Packaged as a jar, the Main Class will load a war file, passed as an argument, as the context root of the web application listening to port 8080. Some samples create a <sample-name>.war which is used as an argument in the App Engine app.yaml entrypoint field.
The App Engine Plugin will stage all the files to upload into App Engine runtime in ${build.directory}/appengine-staging. When deploying an Uber JAR, the JAR is automatically copied into this staging directory and uploaded. It's possible to copy other files into this staging directory (such as additional JVM Agents) and having them available in the deployed App Engine runtime directory.
mvn appengine:stage
| Back | FazBrowse Home | New Git URL |