Setting up your system for pure Java development with command line tools

This section explains how to set up your system to develop pure Java programs using comand line tools and psychWithJava package. OS specific instructions are given in alphabetical order.

Linux and Mac OS X set up

In order to find class definitions, Java searches additional directories that are set in user's CLASSPATH variable. Therefore you have to include the path to psychWithJava.jar file in your CLASSPATH variable. You can set this variable in your start up scripts so that you don't have to set it everytime you login.

  • First figure out your shell. Open a terminal, type
    echo $SHELL
    and press enter. Your shell should be reported.
  • If your shell is bash include the following line in your .bashrc or .bash_profile file
    export CLASSPATH=<full_path_to_psychWithJava>:$CLASSPATH
    if using (t)cshell, edit your .(t)cshrc file to include
    setenv CLASSPATH <full_path_to_psychWithJava>:$CLASSPATH
    <full_path_to_psychWithJava> is the full path to psychWithJava.jar file. For example /home/boyaci/javaClasses/psychWithJava.jar on Linux, or /Users/boyaci/javaClasses/psychWithJava.jar on Mac OS X.
  • To apply the changes either log out and log in, or just re-source your start-up file without loging out. To re-source type
    source <path_to_home>/.bash_profile
    and press enter. To check whether the CLASSPATH is successfully set, type
    echo $CLASSPATH
    and press enter. You should see the path to psychWithJava.jar in the list.
  • MS Windows XP set up

  • Open Control Panel
  • Click System
  • Choose the Advanced tab and then click the Environment Variables button.
  • You now can set (or add) the CLASSPATH system environment variable to psychWithJava.jar file. You should also include a single period (".") in the path. The variable should look something like this

  •   Back