About this Guide

If you would like to set Jao up on your own machine to play or to develop, the installation guide will take you through the required steps. At present, there is no public Jao server available, so if you don't know anyone with a private server, you'll have to install it and get it working yourself.

Gaining Understanding

An image of how all the pieces of Jao fit together.

Jao consists of various clients, a shared messaging layer and a server. Most of the clients are Java applets, and are served to a user via a web server and browser. There is a console version which was originally intended to be used with screen reading software for visually impared users, however, the current direction is to make one of the applet clients accessible in that way. Jao is written entirely in Java.

The JaoServer runs on port 4242, by default. The protocol is based on RMI and allows two-way asynchronous communication through the same connection. In this way, clients can receive event notifications, even behind a firewall, with the use of a single port. The administrator who installs the JaoServer will need to open port 4242.

Various HTML pages are provided for different web browsers and for the two screen resolutions 1024x768 and 800x600. The 1024x768 version has more room given to the chat window. The play area is the same size in both versions. The one that should be tried first is the Applet version, at 1024x768. If this version does not work in a given browser, try the other combinations.

There are two sets of HTML pages for Jao. One set is deployed to the "play-site": the site that will serve the webpages to the browser that will in turn present the Jao applet clients to the user. The console client (or any clients based on it, such as any computer players/clients that might be constructed) does not need the "play site" to run. The other set of HTML pages is the "doc-site": the pages deployed to jao.sourceforge.net as documentation for Jao (this page is one of that set of pages). The doc-site is constructed from XML xdocs by Maven.

Getting Started

First, you will need to compile Jao. You will need Apache Ant, and if you want to generate the documentation yourself, you will need Apache Maven. To generate this documention, run "mvn site:site" from the doc-site directory.

Determine the place on your local machine that you want to put the play-site. If the play-site is not going to be served from your local machine, this location may be merely a staging area from which you can deploy to the web server which will serve the play-site. Edit the build.xml and change the site-dir property to point to this location. Then run "ant deploy-play-site". The web.jar archive will be created and the HTML files to serve the applet versions of the site will be copied into the directory you have specified. Either make that directory available via a web server or deploy it to a web server.

Next, start the JaoServer. A sample batch file "start-server.bat" and shell script "start-server.sh" are provided in the root directory of the installation. Unless java is not in your path (for the shell script) or %JAVA_HOME% is not set (for the batch file) these will not need to be modified for your system in order for them to work.

As Java applets normally can only make socket connections to the server that served them up, it is strongly recommended that the JaoServer be available to the client at the same DNS at which the web server is reached. It is possible to tell the applet to connect to a different host, but the applet security must first be modified in order to allow it. This configuration is beyond most users, and is specific to which version of Java applet support has been installed on the client's machine. If the applet is served from the local file system, it will first attempt to connect to the local host.

Once the play-site has been deployed and the JaoServer is started, it's time to connect to the server and start a game. Please continue with the User Guide.