Building the WLab components

Building the WLab WAR file

(NB: On Windows, when we say "a command line", we mean "the Cygwin Bash shell")

WLab uses Apache Maven (http://maven.apache.org/) to manage its dependencies and to simplify the build process. If you do not have Maven installed you should install it now.

To build a WAR file for installation on Tomcat or other servlet container, navigate to the WLab directory in a command line, then issue the following commands:

mvn clean
mvn compile
mvn jibx:bind
mvn war:war

If you receive a build error, check that you are in the correct directory. There should be a file called pom.xml present. A common error is when the initial directory created to hold the source is itself named WLab – this would result in the directory structure WLab/WLab, and here it would be the second level down where the Maven commands should be issued.

The first time you use Maven for WLab, it may take some time as the required libraries are downloaded. After each step, you should see (among other output) the result BUILD SUCCESSFUL. Following a successful build, you can find the resulting WAR file in WLab/target.

Building Jumpgate

The build process for Jumpgate uses the more standard make command, and is simply a case of navigating into the Jumpgate directory and issuing the command:

make generic

Once the process is complete, you should find that you have a binary executable called simply jumpgate in the current folder (jumpgate.exe on Windows). Note that unlike the other components used in WLab which are Java based, Jumpgate is written in C, so the binary will only run on the platform it was originally compiled on.

If you are building a version for Windows, and you intend to run the binary on a machine that does not have Cygwin installed, you will need to include the cygwin1.dll file along with jumpgate.exe. The DLL file must be present in the same directory as the EXE at runtime.

Building the TightVNC Java applet

The VNC client applet also uses the make command. Navigate into the TightVNC-Java-pnmod/src directory, and in a command line, simply type:

make

You should end up with a binary in the same directory, vncviewer-pn.jar.

For this binary to be useful in a WLab context, it must be digitally signed with the jarsigner tool. If not, the Java security model restricts any connections from the applet to the web server from which it was delivered. This would mean that the applet would not be able to establish a connection to any WLab virtual machines. The web page http://wiki.plexinfo.net/index.php?title=How_to_sign_JAR_files gives a quick overview of how one can sign a JAR with a test key, for those not familiar with the process.