2397824841_f268759675 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.

stp 1

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

stp 2

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’.

stp2!

This will generate a working web application. The structure of the project will looks like this:

step2b

Step 3 : Running your web application on local host

Now right click on your application and click on Run as… > Web Application.

step3

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

stp4

You can also sign-in with your existing Google account.

The app engine account needs SMS verification.

step2323

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.

aasasa

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>

ssss

Step 7 : Deploy your app to App Engine

Now , right click on your project > Google > Deploy to app engine.

ddfsds

Enter your Google account details when prompted

ssssssdasdas

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.

  1. java.io.IOException: Error posting to
    URL: https://appengine.google.com/api/appversion/...
  2. 400 Bad Request
  3. Invalid runtime specified.
  4. Unable to upload app: Error posting to URL: https://appengine.google.com/api/appversion/...
  5. 400 Bad Request
  6. Invalid runtime specified.

If you don’t have access to the java version yet, you can apply for permission here.

Reference: The official Google eclipse support page