An installation of JDK 1.7 or OpenJDK7. We have successfully built Maxine with JDK version 1.7.0_25. It should work with other 1.7.0 versions, but sometimes changes in the JDK code require modifications to Maxine. N.B. Maxine is no longer supported on JDK 1.6.

On Solaris, you need the libproc.h header file from OpenSolaris. Due to licensing issues, we are prevented from supplying this file with our download. You need to copy it to Native/tele/solaris/ before building Maxine's C code on Solaris.

GNU make version 3.7.9 or later, which must be on your command path as gmake.

A C tool chain (i.e. compiler, preprocessor and linker). We have limited resources for testing C compiler support on a wide variety of platforms. The table below lists the C tool chains that known to work (or not) for each platform. Please help us expand this compatibility matrix by leaving a comment on this page when you try building Maxine on another platform.

Some of the support needed by the C tool chain on Mac OS X is obtained by installing Apple's Xcode tool suite. Apple recently changed the way Xcode gets downloaded and installed, and an additional step is now required beyond the standard installation. Open the Xcode application (located in the /Applications folder), open the Preferences pane, select the Downloads section, select the Components tab, and install "Command Line Tools".

Inspector Look & Feel

As of February 2011, the Inspector's GUI toolkit defaults to the native Look & Feel (L&F) of the platform on which it runs, also known as the SystemLookAndFeel. Prior to Februry 2011, the Inspector was configured to use only the Java L&F, also known as Metal, also known as the CrossPlatformLookAndFeel. See also Available Look and Feels.

There are three ways to override the Inspector's selection of Look & Feel: two by using standard Java platform mechanisms and one by modifying Inspector source code.

swing.properties file: it is possible to change the platform default L&F by putting swing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel in the swing.properties file, whose location is platform-specific (see Specifying the Look and Feel: swing.properties File).

MaxineInspector.java: the source line that formerly forced the Inspector to use the Metal L&F is still present; it is commented out and could be restored. See class com.sun.max.ins.MaxineInspector.

Java considerations under Mac OS X

Required version

Maxine requires Java 1.7, which is not the default installed Java on Mac OS X. You must download JDK 7 from the Oracle Site, and ensure that JDK 1.7 is the default Java when building and running Maxine.

Inspector considerations under Mac OS X

Elevated privileges required

The The Maxine Inspector makes use of the task_for_pid() system call to control the Maxine process being debugged/inspected. Mac OS X restricts use of this call to processes that are either owned by root or whose group id is the procmod group. Prior to Mac OS X 10.6 (i.e. Snow Leopard), a work around for this was to setgid procmod the executable that runs the Inspector, i.e. the java binary in your JDK 1.6 installation. While this worked, it opened security vulnerabilities for other Java programs run by the same executable. A better solution is to require the Inspector to be run as root. This is now enforced in the mx script by having the Inspector launched via sudo.

One other side-effect of this security policy on Mac OS X is that the Inspector cannot be launched via an IDE unless the IDE supports prefixing the Java executable it uses with sudo. If you need to debug the Inspector on Mac OS X, then you must launch it externally to the IDE in such a way that it suspends itself and waits for a debugger to connect to it. This can be achieved via the mx script as follows:

You now need to start a remote debugging session in the IDE that connects to port 8000 (or whatever port number you choose). For example, the steps for doing this in Eclipse are:

From the main menu bar, select Run > Debug Configurations... to open the Debug Configurations dialog.

Double-click the Remote Java Application node to create a new launch configuration.

In the Project field under the Connect tab, select (or type in) the Inspector project.

Set the Host and Port fields to localhost and 8000 respectively.

Press the Debug button.

NoteThe ideal solution would be to use the Authorization Services on Mac OS X to enable the Inspector process to dynamically elevate its privileges at run time. The Inspector includes some code (discussed in more detail here) that attempts to use these services but unfortunately, it doesn't yet work for unknown reasons. Apparently, we are not the only ones to have encountered this problem.

Inspector considerations under OpenSolaris

Currently, the JDK that ships with OpenSolaris does not include a 64-bit version of the native code used by the accessibility framework. Given that the Inspector has its own native 64-bit libraries, the JVM running it has to be launched in 64-bit mode (i.e. the -d64 VM option is used). It appears that all Swing-based apps try to load the accessibility library at some point and so the Inspector crashes at this point with an error like this:

Until the JDK on OpenSolaris includes the missing 64-bit JNI library, the workaround according to this thread on the OpenSolaris forums is to rename or remove /usr/java/jre/lib/accessibility.properties from the system.

The individuals who post here are part of the extended Oracle community
and they might not be employed or in any way formally affiliated with Oracle.
The opinions expressed here are their own, are not necessarily reviewed in
advance by anyone but the individual authors, and neither Oracle nor any
other party necessarily agrees with them.