I have a proprietary java application which used to work under Snow Leopard but fails under Lion with the following backtrace:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid display mode at apple.awt.CGraphicsDevice.setDisplayMode(CGraphicsDevice.java:472) at apple.awt.CGraphicsDevice.setFullScreenWindowSynchronized(CGraphicsDevice.java:363) at apple.awt.CGraphicsDevice.access$000(CGraphicsDevice.java:25) at apple.awt.CGraphicsDevice$1SetFullScreenAction.run(CGraphicsDevice.java:326) at apple.awt.CGraphicsDevice.setFullScreenWindow(CGraphicsDevice.java:331)
The call to
setFullScreenWindow only passes
null, i.e. it attempts to restore from full-screen to windowed mode. The error only occurs when a beamer is connected and thus the screen resolution is adjusted to 1024x768. Looks like a bug in the Java VM to me.
Looking at the code, it seems to me that OpenJDK 7 might have addressed this issue. So I want to give that a try.
However, even after downloading Java SE 7u7 from Oracle, I can't use it to execute the application, as the application uses some 32bit native code, which this JVM doesn't support:
> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.j/Contents/Home/bin/java -d32 -version Error: This Java instance does not support a 32-bit JVM. Please install the desired version.
So my core question is this: is it possible to install a 32 bit build of a recent version of OpenJDK 7 on Mac OS X Lion? Preferrably as a precompiled package, but if that isn't available, then a well-written instruction how to compile that myself would serve my purpose as well.