Building JDK7 on OS X 10.6.8

Andrew ``Bass'' Shcheglov andrewbass at gmail.com
Fri Aug 30 23:30:42 PDT 2013


Hello,

I've created a patch which enables building OpenJDK 1.7 on Mac OS X
10.6.8. So far, I've got AWT and JFC/Swing applications successfully
running on Snow Leopard. The patch is currently available here:
<https://github.com/hgomez/obuildfactory/blob/master/openjdk7/macosx/patches/native-sun-osx106.patch>.

The original discussion is here:
<https://github.com/hgomez/obuildfactory/issues/3>.

4 Objective-C files are affected:

 * in sun/awt/AWTView.m, 10.7+ code is simply reimplemented with
10.6-only API
 * in sun/awt/CGraphicsDevice.m, 10.7+ code is simply stripped out: as
far as I understand, it's not that important.
 * in sun/java2d/opengl/CGLLayer.m, an UnsupportedOperationException is
thrown from the native code. I have no idea what the correct 10.6
replacement should be.
 * finally, sun/osxapp/ThreadUtilities.h features a minor 10.6-specific
correction.

The decision of which code branch to include at compile time is based on
the __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ preprocessor macro.

I'm asking Objective-C experts who read this list to review the patch
and propose any corrections/enhancements. Any feedback is appreciated.

Also, once the patch looks good to you, would it be possible to merge it
into the main code tree?

Regards,
Andrew.


More information about the macosx-port-dev mailing list