next up previous contents
Next: Using the X-Server Up: The Graphical User Application Previous: Compiling and running the   Contents

Compiling and running the Client Code

First of all, weirdx must be downloaded and compiled. This if available from the following location (http://prdownloads.sourceforge.net/weirdx/weirdx-1.0.31.tar.gz). Unzip and untar and compile this file in a source directory with the following commands;

tar zxvf weirdx-1.0.31.tar.gz
cd weirdx-1.0.31
javac -O com/jcraft/weirdx/*.java com/jcraft/util/*.java

The client code is available at this location (http://www.redbrick.dcu.ie/ hego/project/gui_client1.tar.gz). Download this code into the root directory where weirdX is installed. Unzip and untar the file with the following command;

tar zxvf gui_client1.tar.gz

The java code is stored in the directory com/jcraft/weirdx. To compile this code type;

javac com/jcraft/weirdx/*.java

An RMI stub file then needs to be generated for the Spy class. This can be generated with the following command;

rmic com.jcraft.weirdx.Spy

A sample java.policy file is included with the client code. This does not need to be altered, unless you want to restrict permissions further.
\begin{lstlisting}[frame=trbl,caption=java.policy]{}
grant {
permission java.ne...
... permission java.net.SocketPermission ''*:80'', ''connect'';
};
\end{lstlisting}


Finally, a sample client file that starts the client code is included called "client.bat". This should again be modified to reflect the system.
\begin{lstlisting}[frame=trbl,caption=compile.bat]{}
java -Djava.security.policy=java.policy com/jcraft/weirdx/StartClient
\end{lstlisting}


next up previous contents
Next: Using the X-Server Up: The Graphical User Application Previous: Compiling and running the   Contents
Colm O hEigeartaigh 2003-05-30