Monday, September 06, 2004

OKS on OSX

Running OKS on OSX

Getting the OKS to run on OSX is pretty straightforward. This post describes the few steps needed to get everything up and running. The steps described is based on OS X 10.3.5. If you are running an older version (pre-10.3) you must do things a bit differently since bash is not the default shell.

The OKS comes with an installation guide that gets you 95% of the way. Following the UNIX-specific instructions gets you all the way to the point where you need to set your CLASSPATH. In bash you need to tell the system where the oks-professional.jar lives. This is done using the export command (just as described in the manual).
In bash, do this:

mac:~ user$ CLASSPATH="$CLASSPATH:${basedir}/lib/oks-professional.jar"
mac:~ user$ export CLASSPATH

where ${basedir} is the path to the oks, eg.

/Users/peter/Desktop/oks-professional

This is sufficient to get the OKS running. The problem is that bash forgets this every time you log out of your shell. To make this permanent you need to create two files in the home directory of the user running OKS. In bash, do this:

mac:~ user$ pico .bash_login

In the pico editor enter this line:

source .bashrc

exit the pico editor (ctrl-x) saving the change as you exit.

Then you need to create the file .bashrc:

mac:~ user$ pico .bashrc

Again, in the pico editor add these two lines:

CLASSPATH="$CLASSPATH:${basedir}/lib/oks-professional.jar"
export CLASSPATH

where ${basedir} is the path to the oks-directory

exit the pico editor (ctrl-x) saving the change as you exit.

Next time you log in to bash the CLASSPATH is set for you.