Jikes & OS X

<1 min read

According to reports on the Java-Dev mailing list, the Jaguar dev tools installation still comes with Jikes 1.15 and there are issues with compiling the latest version. Be sure the build Jikes 1.16 under 10.1.5 prior to the 10.2 upgrade. Here are the steps I used…

Open a terminal window, then type:

curl ftp://sources.redhat.com/pub/bzip2/v102/bzip2-1.0.2.tar.gz -O

to download bzip2 which is required to expand the Jikes archive. You could also manually download the source and use StuffIt Expander to extract it. If you do, you may skip directly to the compilation steps. Otherwise, type:

tar zxvf bzip2-1.0.2.tar.gz
cd bzip2-1.0.2
setenv CC cc
sudo make -e install
rehash
cd ..
rm -rf bzip2-1.0.2*

which will decompress, compile and install bzip2. Note that you'll be prompted for your password after the sudo command.

To download the Jikes source code, type:

curl ftp://www-126.ibm.com/pub/jikes/jikes-1.16.tar.bz2 -O

To uncompress the archive, type:

bunzip2 jikes-1.16.tar.bz2
tar xvf jikes-1.16.tar

To compile and install Jikes, type:

cd jikes-1.16
./configure
sudo make install
rehash
cd ..
rm -rf jikes-1.16*

The make command will take a while. Feel free to go grab a snack or something. :-)

By default, Jikes is installed in /usr/local/bin, but some applications may still look for the older version in /usr/bin. Renaming the old version and creating a symbolic link to the new version will circumvent the problem:

cd /usr/bin
sudo mv jikes jikes-old
sudo ln -s /usr/local/bin/jikes .

Yes, the last sudo command ends with a period. Do not forget it.

Finally, you can verify that the proper version of Jikes is active by typing:

jikes -version