Installing SSJ on Windows

Requirements

SSJ requires a Java 2 Virtual Machine.

The Colt library is used by a few SSJ classes. The library, its source code and documentation, can be downloaded for free from its home page. The colt.jar archive is already included in the SSJ distribution and it must be in the CLASSPATH environment variable.

The UNURAN library is used by the class UnuranContinuous, UnuranDiscrete, and UnuranEmpirical in the package called randvar. It can be downloaded for free from its home page. Downloading, compiling and installing UNURAN is optional. It is required only if SSJ must be rebuilt. However, the UNURAN documentation is required to use the SSJ UNURAN interface efficiently.

The linear_algebra library is based on public domain LINPACK routines. They were translated from Fortran to Java by Steve Verrill at the USDA Forest Products Laboratory. This software is also in the public domain and is included in the SSJ distribution as the Blas.jar archive, which must be in the CLASSPATH environment variable. It is used only in the probdist package to compute maximum likelihood estimators.

The optimization package of Steve Verrill includes Java translations of the MINPACK routines for nonlinear least squares problems as well as UNCMIN routines for unconstrained optimization. They were translated from Fortran to Java by Steve Verrill and are in the public domain. They are included in the SSJ distribution as the optimization.jar archive, which must be in the CLASSPATH environment variable. It is used only in the probdist package to compute maximum likelihood estimators.


Unpacking

By using WinZip or any equivalent program, the user needs to unpack the ZIP file ssj-<DATE>.zip to any location; this will create a ssj subdirectory containing all files of the distribution. For example, if the files are unzipped in C:\Program Files\java, the base directory of SSJ will be C:\Program Files\java\ssj.

Set up the environment

To use SSJ, the ssj.jar, colt.jar, Blas.jar and optimization.jar archives, located in the lib subdirectory of the package, must be part of the CLASSPATH environment variable. This variable is a semicolon-separated list of paths being searched by the Java Virtual Machine for classes. For the native methods (Chrono and UNURAN support) to work properly, the PATH environment variable must include the lib subdirectory of SSJ. This variable is a semicolon-separated list of paths being searched by Windows when an executable or library is loaded.

Windows 95/98/Me

For Windows 95/98/Me, batch files are available to setup the environment for the user. The SSJHOME environment must be set prior to calling the setup batch file.

Commands for Windows 9x/Me:

   set SSJHOME=<path to SSJ>
   call %SSJHOME%\Ssj.bat
Here, <path to SSJ> must be replaced by the absolute path to the unpacked ssj subdirectory, for example C:\Program Files\java\ssj. For SSJ to be always available, the above command lines should be added to C:\autoexec.bat file. The computer will have to be restarted for changes in this configuration file to take effect.

Windows 2000/XP

Under Windows 2000/XP, since there is no startup file, the environment variables must be set manually.
  1. The System Properties must be accessed by right-clicking on the My Computer icon and selecting Properties.
  2. From the System Properties, the user can access the environment variables by selecting the Advanced tab and clicking on Environment Variables. A user having the Administrator privilege can modify the system variables to install SSJ for everyone on the machine while a user with a limited account can only modify his own variables to install SSJ for himself.
  3. The user should create the SSJHOME variable by using the New button below the list of system or user variables. SSJHOME must be entered as the variable name while the value of the variable must be the base directory of the SSJ distribution, e.g., C:\Program Files\java\ssj.
  4. The CLASSPATH variable must be created or modified to contain at least .;%SSJHOME%\lib\ssj.jar;%SSJHOME%\lib\colt.jar. If it already exists, the variable can be selected and its value can be changed by clicking on the Edit button.
  5. After the PATH variable is selected, the user must click on the Edit button to append the string ;%SSJHOME\lib to its value.
Changes to the environment variables apply to newly-launched programs only. As a result, if a DOS prompt was active during the setup, it will have to be closed and reopened to access SSJ classes.

Note on Java IDEs

Note: Some Java Integrated Development Environments (IDEs) such as Eclipse do not use the standard CLASSPATH environment variable. These environments must be notified about the location of colt.jar and ssj.jar manually. The procedure used to set these parameters can be found in the documentation of the specific Java IDE. If the archives cannot be located, the SSJ programs will not compile or not execute properly.


Documentation

SSJ is bundled with documentation in PDF and HTML formats. It can be found in the %SSJHOME%\doc directory. The html subdirectory contains the HTML version processed using Javadoc. It allows to find classes and methods documentation easily, but it is difficult to print and some information is missing. It can be viewed by opening index.html in any Web browser.

The PDF documentation, stored in the pdf subdirectory, can be easily printed using Adobe Reader or any other PDF viewer. It is the most complete documentation, but method descriptions are not accessible through hyperlinks.

The examples subdirectory contains examples of simulation programs using SSJ and can be a useful tool to learn SSJ.