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 to the path of your JDK installation. If you are abash
user, the following considerations apply:-
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
In one section of this tutorial you will deploy an app to appspot, which requires a Google Developers Console project. 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 make up your own.
-
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.) - Click Create Client ID.
- Keep this tab open so you can look up the client and project IDs later.