Swing sample fails with my OpenJDK built on Mac OS X 10.6.4

Ralph Seichter openjdk-ml at seichter.de
Sun Oct 24 08:51:56 PDT 2010


Hello,

I am new to OpenJDK and I hope this is the proper mailing list to ask
about Mac-related details?

Based on http://wikis.sun.com/display/OpenJDK/Darwin10Build I have built
OpenJDK on Mac OS X 10.6.4 Snow Leopard.

  $ java -version
  openjdk version "1.7.0-internal"
  OpenJDK Runtime Environment (build 1.7.0-internal-ralph_2010_10_22_20_59-b00)
  OpenJDK 64-Bit Server VM (build 19.0-b05, mixed mode)

Eclipse (Helios SR1) and Tomcat 6.0.29 seem to be running OK with this
build. Compiling the Swing sample

  http://download.oracle.com/javase/tutorial/uiswing/examples/start/HelloWorldSwingProject/src/start/HelloWorldSwing.java

works aswell, but when I run HelloWorldSwing with my OpenJDK build, Java
execution terminates when "frame.pack();" is called. No exceptions or
errors are reported, at least I have not found anything yet (maybe I am
looking in the wrong place). Debugging seems to suggest that execution
stops after several levels of recursion in java.awt.Container.preferredSize().

I wonder if anybody else is experiencing this? When I modify the run
configuration to use Apple's JRE or SoyLatte instead, the Swing demo
code works fine.

BTW, running the code with OpenJDK launches X11 on my Mac, so I think
that my build was linked with the proper libraries. I have built OpenJDK
with both gcc-4.0 and gcc-4.2, but, as expected, this did not make any
difference regarding the Swing problem.

-Ralph



More information about the bsd-port-dev mailing list