From Arianne
Jump to: navigation, search

Building Stendhal is very simple if you use ant and you satisfy the dependencies.

But first... are you sure that you don't want to use an IDE?

This guide is aimed at those who just want to play the latest version of the game before it is officially released. If you intend to do modifications to the game, it is recommended that you follow Configure a development environment (IDE) instead.

Get brew to make it easier

With Brew you can install the stuff you need that Apple didn’t.

/usr/bin/ruby -e "$(curl -fsSL"

Get the source Stendhal code

First of all, you need to get the Stendhal source code. There are two ways:

  • Download the source distribution at Use gunzip -cstendhal-version-src.tar.gz | tar xopf - to unpack it.
  • Alternatively you can clone the git repository to get the latest development version: brew install git and git clone


These are the requirements needed to build Stendhal:

  • OpenJDK or Oracle JDK 1.7 or higher e.g.:

Download Oracle JDK from Oracle website. You need to accept license agreement to be able to download the file. Make sure you select the Mac OS X platform. Double-click the downloaded file '*.dmg' and follow the on-screen installation.

Verify that the system is now using JDK

java -version

brew install ant

Building with ant

cd stendhal-version 
ant clean &&  ant dist

This will create the binaries you should be already familiar with, such as:

Client files


Server files


Source files


Building just the jar files

Note: If you are unsure, follow the instructions described in the previous section (ant dist) to get a working system with all the files in the correct directory structure.

To only build the jar files, without putting them together inside a zip, you just write


This will build a full set of JAR files at stendhal-version/build/lib folder:

Client files


Server files



When you have successfully built Stendhal please read the install documentation. It is available on the Wiki at InstallingStendhal.

In the future if you wish to just create the client and server jars (not zips and all release packages) then

ant clean compile

will suffice. Remember to "ant clean" before you "ant build" everytime - this is done automatically if you "ant dist", however.