Having chosen Google App Engine and Java as the target for initial development it’s time to setup a development environment. Google provides a plugin to Eclipse that makes this easy. They do a great job explaining how to setup the environment at this URL:
One hang up I had was an error when first trying to install the plugin in eclipse. It complained about “An error occurred while collecting items to be installed”. Several files came back saying “Unable to read repository” and “Read timed out”. It was possible to download these directly (outside of Eclipse) so I downloaded the ones that produced errors and moved then into the plugins folder. After that the installation process worked as outlined in the link above.
Possibly related to the problem I just mentioned was that I had to manually extract com.google.appengine.eclipse.sdkbundle_1.6.1 into its own directoy and in preferences I had to point to the sdk manually. I did this by going to Window -> Preferences. In the preferences window navigate to Google -> App Engine. There you can Add a link to the directory where you put your sdk files from the above mentioned jar.
In case you plan to develop for GWT, you may need to set additional variables for your Java runtime environment
Using Eclipse for GAE Development
About halfway down the page for installing the Eclipse plugin (link above) there are two sections that take you through the process of creating and running a project. When I created a new project I selected the checkbox to generate sample project code. This created a Hello World project and made it a snap to test that my environment was setup correctly.
If you’ve accomplished everything above then you should be able to load http://localhost:8888 and see your test application.
One thing I love about developing for app engine in Java with this setup is that the build/deploy process happens automatically. Eclipse rebuilds classes each time the source for that class is saved. The newly compiled class is inserted into the running web server. The same is true for changes to static files and resources. This means you can simply save and refresh, much like you would when using an interpreted language. A small gotcha is that you must ‘Debug As’, NOT ‘Run As’ in order for this dynamic refresh behavior to work.