Jtest logo




Contents  Previous  Next  Index

UNIX Installation and Setup


Before you can use Jcontract on your own code, you need to install the program, install a license, then set the necessary environment variables.

Glossary

<jcontract-home>: The Jcontract installation directory (the directory where Jcontract is installed).

<arch>: The platform on which Jcontract will be run. For example, solaris, linux, etc..

<compression-scheme>: The compression scheme used to create the Jcontract installation archive. "compressed" is standard. "gzipped" is faster and smaller, but not common.

Prerequisites

  • JDK 1.3.1
  • One of the following platforms:
    • Solaris 7 or 8. All relevant patches from Sun that will allow the machine to run the interpreter from JDK 1.3.1 must be installed.
    • RedHat Linux 6.2 or 7.1 with one of the following kernels: 2.2.14-5.0, 2.4.2-2.

Installing Jcontract

  1. Copy the jcontract.<arch>.tar.<compression-scheme> to the directory where you would like to install Jcontract.
  2. Extract the archive. During extraction, a directory named 'jcontract' will be created with the program files necessary to run the program.
    • For .gz files, enter:
      gzip -dc jcontract.<arch>.tar.gz | tar xvf -
    • For .Z files, enter:
      uncompress -c jcontract.<arch>.tar.Z | tar xvf -
    • Remember to substitute your specific architecture name (for example, solaris, linux, etc.) for <arch>.

You must install a license and set your environment before you start using Jcontract on your own code.

Note: A license is not required to run Jcontract's built-in examples.

Installing a License

To install a license:

  1. Call 1-888-305-0041 to receive your license.
  2. Run dbc_license to install your license.

Setting the Environment

After installing Jcontract, you must set up your environment before you can run Jcontract. To set the environment:

  1. Use the provided shell script to set up your environment or set up the environment by hand.
    • To use the script:
      • For bash or sh shells: Run the 'jcvars.sh' script in <jcontract-home>. For example:
        $ cd <jcontract-home>
        $ . jcvars.sh
      • For csh, tcsh, or ksh shells: Source the 'jcvars' script in <jcontract-home>. For example:
        $ cd <jcontract-home>
        $ source jcvars
      • To determine which shell you are using, enter:
        $ echo $SHELL
    • To set up the environment by hand:
      The script sets up a couple of environment variables needed to run Jcontract. It adds to the PATH environment variable the '<jcontract-home>/bin' directory. Additionally, it adds to the LD_LIBRARY_PATH environment variable the '<jcontract-home>/lib' directory. These two settings are required for proper functionality of Jcontract.
  2. Make your changes to LD_LIBRARY_PATH and PATH permanent. To make these changes permanent, include the call to the script in your shell's login script. If you are confused about this step, then it is best to ask a sysadmin for help. Until the sysadmin responds, use the scripts provided in the <jcontract-home> directory.

Additional Requirement

Jcontract needs to know the location of Sun's 'javac' compiler on your machine. The `bin' directory of the JDK must be added to your path. Example commands you can use to do this include:

  • For sh-like shells:
    $ export PATH=$PATH\:/usr/java/jdk1.3.1/bin
  • For tcsh, csh, and ksh:
    $ set path=($path /usr/java/jdk1.3.1/bin)
    $ rehash

Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft