After hearing from Google, I gave a try to Java support for Google App Engine. There are tutorials available at the official Google App Engine website. I decided to write my own tutorial for you guys to create a simple “Hello World “ web application on java and run it on Google App Engine. So here it is:
You need to install Eclipse for this tutorial
Step 1 : Add Google plug-in for Eclipse:
Add the Google plug-in in eclipse using Help menu > Software Update > Available Software > Add site>. The URL is https://dl.google.com/eclipse/plugin/3.4.
Click on the Install button and restart eclipse after adding the plug-in.
Step 2 : Create new project in eclipse
Now create a new Web Application Project using File > New > Web Application Project
Write your project name and package name. To keep the application simple, uncheck ‘use GWT(Google Web Toolkit)’ and check ‘Use Google App Engine’, then click ‘Finish’.
This will generate a working web application. The structure of the project will looks like this:
Step 3 : Running your web application on local host
Now right click on your application and click on Run as… > Web Application.
Web application will launch locally on port 8080. In my case, the URL is:
https://localhost:8080/helloworldgoogleapp
4:Create a Google App Engine account
Before you can deploy your hello world application on Google app engine, you need to create an account. Go to https://appengine.google.com/ and create an account
You can also sign-in with your existing Google account.
The app engine account needs SMS verification.
Step 5 :Select a unique application id in Google App Engine
You need to select a unique application id before proceeding. After selection the application id, the domain https://<your application id>.appspot.com is reserved for your application.
Step 6 : Configure eclipse to use this application id
Right click on your eclipse project > Google > App engine settings. Enter your application id. Alternatively you can directly modify your appengine-web.xml file to add your application id.
<application>helloworldgoogleapp</application>
Step 7 : Deploy your app to App Engine
Now , right click on your project > Google > Deploy to app engine.
Enter your Google account details when prompted
The above step should deploy your application to Google app engine. Right now, this feature is available to only the first 10,000 users. If you are not one of the first 10,000 users you will get the following message on the console.
|
If you don’t have access to the java version yet, you can apply for permission here.
Reference: The official Google eclipse support page