The installation procedures explained here are general and refer to installing all the components of the Moses toolkit. Depending on the usage of the system only some of the components might need to be installed in some particular case. We strongly recommend, however that the whole toolkit is installed as directed here.
Moses is implemented entirely in Java. In order to install and run Moses, one needs to have the following components already installed. It is also expected that the user is minimally comfortable to using the following:
Create an installation directory installationdir. This is a directory where the runtime system will be located.
Identify the java installation directory javadir. Usually, it is /usr/java1.4/ on Unix, or C:\Program Files\J2SDK\jdk1.4.0\ on Windows.
Download the Moses distribution, and place it in the newly created installationdir.
Extract the content of the Moses distribution archive and place it in the
same directory. If WinZip is available, use its GUI. If using jar
tool, acquire a terminal (or press run and execute cmd in Windows)
and perform the following steps:
> cd installationdir
or simply :
> ls
moses.jar
> javadir/bin/jar xvf moses.jar ./
> jar xvf moses.jar ./
if javadirbin/ directory is in the PATH environment variable)
The content of the installationdir directory should be :
moses.jar
After this step the original moses.jar archive is not required
anymore, and it can be set aside.
xerces.jar
jinni.jar
moses
Identify the location of tools.jar file. This file is part of any standard java SDK installation and it contains java classes required for the dynamic compilation of java laws. Usually the location is javadir/lib/tools.jar . Make sure that this file is the same version (or it belongs to the same release) as the java executable you are using currently.
Set the CLASSPATH environment variable to point to the following
items:
.
installationdir/
installationdir/jinni.jar
installationdir/xerces.jar
javadir/tools.jar
In Windows, go to (Start, Settings) Control Panel. Then double
click on System, Advanced tab, Environment Variables. Check either
the User or the System variables for the CLASSPATH
entry. If this entry already exists, modify it. If not, create a new
entry with this name, by pressing New... on User variables. The variable value
should contain:
javadir\lib\tools.jar;installationdir\jinni.jar;installationdir\xerces.jar;installationdir\;.
In Unix, depending on the shell being used and the login script, set
the classpath as follows: in .cshrc file add or modify the
CLASSPATH entry such that it contains:
setenv CLASSPATH
installationdir:installationdir/jinni.jar:installationdir/xerces.jar:javadir/tools.jar:.
Try the new installation. In Windows, open a new command terminal
(Run, then type cmd). In Unix, open a new terminal (such
that the new CLASSPATH settings will be loaded).
Type
> java moses.Controller
The terminal should read the following output:
Controller starts (use -help option for help)
host:9000 is sandboxed
Location of the configuration files is:
installationdir/moses/controllerConf
If the output is this, then the installation is
complete. Congratulations!
If the output is
java: Command not found.
or:
'JAVA' is not recognized as an internal or external command,
then make sure that the javadir/bin is indeed the java
installation directory. Alternatively place this value in the
PATH environment variable.
operable program or batch file.
If the output is
Exception in thread "main" java.lang.NoClassDefFoundError:
moses/Controller
then make sure that the
installationdir\ entry is
the actual installation directory, and it is present in the classpath
environment variable.