To complete this tutorial, you'll need the proper versions of Java and Maven. Maven is a useful build automation/packaging tool for Java projects that manages build execution and also dependencies.
Required Java version
We recommend using Java 7, preferably the Enterprise Edition.
Downloading Java
If you don't have Java, follow these instructions to download the Java Development Kit (JDK) for Java version 7:
-
Download and install it.
-
Set your
JAVA_HOMEenvironment variable. If you are abashuser-
For a typical Linux installation, add a line similar to the following to your
.bashrcfile:export JAVA_HOME=/usr/local/tools/java/<jdk_version>where
<jdk_version>is your JDK version, for example,jdk1.7.0_45.jdk. -
If you use Mac OSX and the default Terminal app, your shell session doesn't load
.bashrcby 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
.bashrcfile:export JAVA_HOME=/Library/Java/JavaVirtualMachines/<jdk_version>/Contents/Homewhere
<jdk_version>is your JDK version, for example,jdk1.7.0_45.jdk.Alternatively, if your OS supports /usr/libexec/java_home, you can request the current JDK version in your export command line, as follows:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
-
Required Maven version
This tutorial requires Apache Maven 3.1 or greater, so you'll need to download it if it isn't installed on your machine. To determine whether Maven is installed and which version you have, invoke the following command:
mvn -v
This command should display a long string of information beginning with
something like Apache Maven 3.1.0.
If Maven isn't installed on your machine, you can download Maven from the Apache Maven website, and install it using the Apache Maven instructions.
The Google App Engine SDK and Maven
When you use Maven, you don't need to download the Java libraries from the Google App Engine SDK. Maven does that for you. You'll also use Maven to test your app locally and upload (deploy) it to production App Engine.