Java 7 runtime support on App Engine standard was deprecated on December 13, 2017 and will be shut down entirely on January 16, 2019. It is replaced by the Java 8 Runtime Environment.
Samples for the Java 8 runtime can be found here.
An App Engine guestbook using Java, Maven, and the Cloud Datastore API via google-cloud-java.
Please ask questions on StackOverflow.
First, pick a project ID. You can create a project in the [Cloud Console] if you'd like, though this isn't necessary unless you'd like to deploy the sample.
Second, modify Persistence.java: replace your-project-id-here with the project ID you picked.
Then start the Cloud Datastore Emulator:
gcloud beta emulators datastore start --project=YOUR_PROJECT_ID_HERE
Finally, in a new shell, set the Datastore Emulator environmental variables and run
mvn clean appengine:run
Modify appengine-web.xml to reflect your app ID and version, then:
mvn clean appengine:deploy