JDSL home The Data Structures Library in Java

Installation Help


Documentation
Download
License
Publications
Support
The JDSL Team
Explorations
News
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 | Mac OS X]


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.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.1 directory. We will refer to $HOME/jtools/jdsl-2.1 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.1/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 JDSL file you downloaded, 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.
    Directory C:\jtools will now contain a jdsl-2.1 directory. We will refer to C:\jtools\jdsl-2.1 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.1\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 JDSL file you downloaded, 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.
    Directory C:\jtools will now contain a jdsl-2.1 directory. We will refer to C:\jtools\jdsl-2.1 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):
    • The list of variables contains a variable CLASSPATH pathlist. The string pathlist could be almost anything -- for example, it might be CLASSPATH .;%JAVA_HOME%\lib\classes.zip. Then click on that variable and add ;JDSLHOME\lib\jdsl.jar to the end of pathlist, using the text-editing boxes below the list. So if you originally had CLASSPATH .;%JAVA_HOME%\lib\classes.zip and you installed JDSL in C:\jtools, then you should now have

      CLASSPATH .;%JAVA_HOME%\lib\classes.zip;C:\jtools\jdsl-2.1\lib\jdsl.jar
    • The list does not contain a CLASSPATH variable. Then add the variable CLASSPATH .;JDSLHOME\lib\jdsl.jar, by adding the name and value to the text-editing boxes below the list. So if you installed JDSL in C:\jtools, then you should now have

      CLASSPATH .;C:\jtools\jdsl-2.1\lib\jdsl.jar
  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 JDSL file you downloaded, if you wish.

Mac OS X

  1. Choose an appropriate directory to hold the JDSL installation -- for example /Developer/Java.
  2. Move the JDSL file you downloaded to /Developer/Java and make /Developer/Java your working directory (cd into it).
  3. If the JDSL file you downloaded was not automatically expanded, then expand it as shown for Unix or using /Applications/Utilities/Stuffit Expander.
    Directory /Developer/Java will now contain a jdsl-2.1 directory. We will refer to /Developer/Java/jdsl-2.1 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. Copy or move JDSLHOME/lib/jdsl.jar to /Library/Java/Extensions. You do not have to change any configuration files because /Library/Java/Extensions is a standard path for extension libraries.
  5. You can remove the JDSL file you downloaded, if you wish.

Last updated 13 April 2003
Questions or comments: jdsl@cs.brown.edu