<<Back to Documentation Index

Configuring x86 Mac OS X to use the 1.6 Java Virtual Machine

In order to run Fortress, you will need to use a 1.6 JVM. This is because only 1.6 JVMs include the necessary synchronization primitives for current versions of  JSR166y. Sadly, only x86 based Macintoshes support 1.6 in any readily-available form. On these machines it's necessary to explicitly configure Java to favor execution under the 1.6 JVM:

Start up the  Java Preferences utility, which can be found in /Applications/Utilities/Java/Java Preferences.app

In the window that displays, drag "Java SE 6" to the top of the list in both boxes (Java applet versions and Java application versions). It may be possible to just change the latter, but we have encountered no problems changing both.

If you're building fortress from source using javac, you'll probably also want to set up an appropriate .antrc.

What's going on

If you look at /System/Library/Frameworks/JavaVM.framework/Versions/, you'll see an elaborate series of symlinks:

drwxr-xr-x  14 root  wheel  476 Mar 12 15:54 .
drwxr-xr-x  12 root  wheel  408 Sep 30  2008 ..
lrwxr-xr-x   1 root  wheel    5 Sep 30  2008 1.3 -> 1.3.1
drwxr-xr-x   3 root  wheel  102 Jan 14  2008 1.3.1
lrwxr-xr-x   1 root  wheel    5 Sep 30  2008 1.4 -> 1.4.2
lrwxr-xr-x   1 root  wheel    3 May  2  2008 1.4.1 -> 1.4
drwxr-xr-x   8 root  wheel  272 Feb 21  2008 1.4.2
lrwxr-xr-x   1 root  wheel    5 Sep 30  2008 1.5 -> 1.5.0
drwxr-xr-x   8 root  wheel  272 Jul 15  2008 1.5.0
lrwxr-xr-x   1 root  wheel    5 Sep 30  2008 1.6 -> 1.6.0
drwxr-xr-x   8 root  wheel  272 May  2  2008 1.6.0
drwxr-xr-x   8 root  wheel  272 Sep 30  2008 A
lrwxr-xr-x   1 root  wheel    1 Mar 12 15:54 Current -> A
lrwxr-xr-x   1 root  wheel    3 Mar 12 15:47 CurrentJDK -> 1.5

It's appears to be important to have Current point to A. If for some reason this doesn't work on your system, you may find you need to move these links around manually, pointing Current and/or CurrentJDK at 1.6 (this used to be true on all OS X systems). If you take this step, however, you'll quickly discover that you can no longer start applications such as OpenOffice that depend upon the 1.5 JVM and need to swing the links back again in order to do so. By contrast, recent OS X releases appear to handle a mix of JVM versions 1.6 and 1.5 using the above configuration.