The Data Structures Library in Java

Installation Help

These instructions are available both from the JDSL web page and from a file in the downloadable JDSL distribution.

[Unix | Windows 95/98 | Windows NT]


Unix

  1. Choose an appropriate directory to hold the JDSL installation -- for example, $HOME/jtools.
  2. Move the JDSL file you downloaded to $HOME/jtools and make $HOME/jtools your working directory (cd into it).
  3. Expand the JDSL file as follows:

    To expand filename.tar.Z:

    uncompress filename.tar.Z
    tar -xvf filename.tar
    To expand filename.tar.gz:

    gunzip filename.tar.gz
    tar -xvf filename.tar
    To expand filename.zip:

    unzip filename.zip
    Directory $HOME/jtools will now contain a jdsl-2.0 directory. We will refer to $HOME/jtools/jdsl-2.0 as JDSLHOME for the rest of this discussion.
    Directory JDSLHOME contains, among other things, a lib directory, which in turn contains a file jdsl.jar. That jar file holds the JDSL class files.
  4. Find the configuration file in your home directory that has the string setenv CLASSPATH pathlist. This file is usually $HOME/.cshrc or ~/.cshrc. The string pathlist could be almost anything -- for example, it might be setenv CLASSPATH .:/usr/lib/java
  5. Add :JDSLHOME/lib/jdsl.jar to the end of that string. (Note that there is a colon at the beginning of the string.) So, if you originally had setenv CLASSPATH .:/usr/lib/java and you installed JDSL in $HOME/jtools, then you should now have

    setenv CLASSPATH .:/usr/lib/java:/$HOME/jtools/jdsl-2.0/lib/jdsl.jar
    (Make sure not to add a line-break in the middle of the line while doing this.)
  6. Save the file.
  7. You will need to re-source your configuration file for any shell from which you wish to use the JDSL classes during this login session. (If you are using csh, type

    source $HOME/.cshrc
    into that shell, substituting in the name of the file you modified.)
  8. You can remove the tar.Z, tar.gz, or zip file, if you wish.

Windows 95/98

  1. Choose an appropriate directory to hold the JDSL installation -- for example, C:\jtools.
  2. Move the JDSL file you downloaded to C:\jtools and make C:\jtools your working directory (cd into it).
  3. Expand the JDSL file, storing the expanded files in C:\jtools (we recommend using WinZip, as it can handle both the zip and the tar.Z formats).
    Directory C:\jtools will now contain a jdsl-2.0 directory. We will refer to C:\jtools\jdsl-2.0 as JDSLHOME for the rest of this discussion.
    Directory JDSLHOME contains, among other things, a lib directory, which in turn contains a file jdsl.jar. That jar file holds the JDSL class files.
  4. Edit your AUTOEXEC.BAT file (usually C:\WINDOWS\AUTOEXEC.BAT). You can either do this using msconfig.exe (available from a menu in the System properties control panel) or with a text editor (for example, Notepad). Do not edit it with a word processing program.
  5. Find the string SET CLASSPATH=pathlist. The string pathlist could be almost anything -- for example, it might be SET CLASSPATH=.;%JAVA_HOME%\lib\classes.zip. If there is no such string, add the string SET CLASSPATH= as a new line.
  6. Add ;JDSLHOME\lib\jdsl.jar to the end of that string. (Note that there is a semicolon at the beginning of the string.) So, if you originally had SET CLASSPATH=.;%JAVA_HOME%\lib\classes.zip and you installed JDSL in C:\jtools, then you should now have

    SET CLASSPATH=.;%JAVA_HOME%\lib\classes.zip;C:\jtools\jdsl-2.0\lib\jdsl.jar
    (Make sure not to add a line-break in the middle of the line while doing this.)
  7. Save the file.
  8. You will need to restart, in order to use JDSL.
  9. You can remove the zip or tar.Z file, if you wish.

Windows NT

  1. Choose an appropriate directory to hold the JDSL installation -- for example, C:\jtools.
  2. Move the JDSL file you downloaded to C:\jtools and make C:\jtools your working directory (cd into it).
  3. Expand the JDSL file, storing the expanded files in C:\jtools (we recommend using WinZip, as it can handle both the zip and tar.Z formats).
    Directory C:\jtools will now contain a jdsl-2.0 directory. We will refer to C:\jtools\jdsl-2.0 as JDSLHOME for the rest of this discussion.
    Directory JDSLHOME contains, among other things, a lib directory, which in turn contains a file jdsl.jar. That jar file holds the JDSL class files.
  4. Double-click the System icon inside the Control Panel. When the System Properties dialog box opens, choose the Environment tab. At this point you need to decide between System Variables and User Variables as the location where you will set your CLASSPATH (the directory path that Java searches to find Java code). System variables affect all users; you may need to use a system variable if you want multiple users to have access to JDSL. You also need to use a system variable if you have been using a system-variable CLASSPATH previously and you don't want your previous programs to stop working. User variables can override or include-and-extend the corresponding system variable. They apply only to a single user. If you already have a user-variable CLASSPATH, we recommend you edit that.
  5. When you have decided which list of variables you want your CLASSPATH in, one of the following situations holds for that list (note the semicolons, which are separators):
  6. Click Set and then OK at the bottom-right of the dialog.
  7. Now JDSL should be installed. You will need to log out and log back in, in order to use JDSL.
  8. You can remove the zip or tar.Z file, if you wish.