Setup
To set up your environment:
-
You must use Java 7. If you don't have Java 7, download and install it.
-
Set your
JAVA_HOME
environment variable. If you are abash
user-
For a typical Linux installation, add a line similar to the following to your
.bashrc
file:export JAVA_HOME=/usr/local/tools/java/jdk1.7.0_45.jdk
-
If you use Mac OSX and the default Terminal app, your shell session doesn't load
.bashrc
by default. So you may need to add a line similar to the following to your.bash_profile
:[ -r ~/.bashrc ] && source ~/.bashrc
-
If you use Mac OSX but don't use the default terminal app, for example, you use a terminal management app such as tmux, you may need to add a line similar to the following line to your
.bashrc
file:export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
-
-
If you don't have Maven installed, download and install Maven.
Creating an App Engine app for deployment
Part of this tutorial covers deploying an app to production App Engine. To do this part of the tutorial, you'll need a Google Developers Console project to deploy to. You can use an existing project, or you can create a new one for the tutorial.
To create a new project for this tutorial:
-
Make sure you are logged into the Google account you want to use for the project.
-
Visit the Google Developers Console . You may need to accept one or more Terms of Service.
-
Click Create Project .
-
In the New Project dialog, assign some name for your project. It doesn't have to match the name you assign to your Maven project (described later). You can accept the project ID or enter your own value. Note the project ID, since you'll need this later.
-
Click Create to create the project.
-
Note the project ID, as you'll need it later. (Alternatively, you can revisit the project later in the console to determine its ID.)
-
Click APIs & auth > Credentials > Create new Client ID .
-
If this is a new project,Fill out the Create Client ID Form :
- Select Web application as the Application Type .
-
Specify
http://localhost:8080
in the textbox labeled AUTHORIZED JAVASCRIPT ORIGINS. (This is for local testing only. We'll change this to the proper deployment value later during deployment . - Click Create Client ID .
- Note the client ID as you'll need it later. (Alternatively, you can revisit the project later in the console to determine its client ID.)