OpenJDK 7 on OS/X and IntelliJ IDEA EAP
Last Updated on Mercredi, 21 mars 2012 08:36 Written by Henri Gomez Samedi, 16 avril 2011 02:16
During the last weeks, Apple started to contribute it’s Aqua/Cocoa port to OpenJDK 7 on the macosx-port branch. It’s still works it progress but it was nice to see some SWING apps like IntelliJ IDEA works on the preliminary release.
I used IntelliJ IDEA EAP (10.5) and tweaked it’s startup shell.sh to define AWT_TOOLKIT=CToolkit and add -Dswing.defaultlaf=com.apple.laf.AquaLookAndFeel since Aqua Look and Feel is not default for now.
export CLASSPATH LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH export LD_LIBRARY_PATHAWT_TOOLKIT # AWT/Cocoa port for OpenJDK 7 macosx-port export=CToolkit JVM_ARGS="-Dswing.defaultlaf=com.apple.laf.AquaLookAndFeel $JVM_ARGS" cd "$IDEA_BIN_HOME" while true ; do $IDEA_JDK/bin/java $JVM_ARGS -Djb.restart.code=88 $IDEA_MAIN_CLASS_NAME $* test $? -ne 88 && break done
Then defined OpenJDK 7 from macosx port (available here) as default JVM and started IntelliJ by calling its shell script :
export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home /Applications/IdeaX-IU-106.396.app/bin/idea.sh
And I could see a Swing based application running on OpenJDK 7 and OS/X.
IntelliJ IDEA is so the second major IDE to be compatible with OpenJDK 7 and OS/X – Cocoa, first one was Eclipse thanks to it’s SWT/Cocoa bridge.
I tested with both NetBeans 7 RC1 and RC2 but it didn’t works. I hope it will be fixed in NetBeans 7 final release.
OpenJDK 1.7 for OS/X benchs
Last Updated on Samedi, 4 décembre 2010 11:50 Written by Henri Gomez Samedi, 4 décembre 2010 10:17
After building and packaging OpenJDK 1.7 for OS/X, I wanted to see how performed new VMs.
Test vms
Recents OpenJDK 1.7 32 and 64bits where used :
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-henri_2010_12_01_00_46-b00)
OpenJDK Server VM (build 20.0-b02, mixed mode)
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-henri_2010_12_01_00_49-b00)
OpenJDK 64-Bit Server VM (build 20.0-b02, mixed mode)
Test system
My test system is an Apple Mac Book Pro (MacBookPro5,1) with Intel Core 2 Duo 2.66Ghz and 4Gb DDR3 1067Mhz, running under SnowLeopard 10.6.5 32bits.
DaCapo Benchmarks
I used again DaCapo 9.12-bach, discarding batik test, this one requiring a working AWT/Swing support .
Bench tests launched with -n X, ie (java -jar dacapo-9.12-bach.jar -n 10 pmd)
| Bench | Apple JDK6 | OpenJDK 6 | OpenJDK 1.7 32bits | OpenJDK 1.7 64bits |
|---|---|---|---|---|
| avrora (10 iterations) | 5247ms | 4980ms | 6592ms | 4808ms |
| eclipse (2 iterations) | 53292ms | 34404ms | 40996ms | 38335ms |
| fop (10 iterations) | 560ms | 408ms | 505ms | 383ms |
| h2 (2 iterations) | Failure (pending test) | 6488ms | 6876ms | 5557ms |
| jython (2 iterations) | 6034ms | Failure (Trace/BPT trap) | Failure (Trace/BPT trap) | Failure (Trace/BPT trap) |
| luindex (10 iterations) | 1072ms | 990ms | 1034ms | 967ms |
| lusearch (10 iterations) | 5997ms | 3957ms | 4884ms | 3895ms |
| pmd (10 iterations) | 3067ms | 2890ms | 3085ms | 2188ms |
| sunflow (10 iterations) | 6998ms | 6442ms | 6898ms | 6719ms |
| tomcat (5 iterations) | 4108ms | Failure (connection reset) | 4041ms | 3698ms |
| tradebeans (5 iterations) | 8257ms | Failure (connection reset) | 6384ms | 5545ms |
| tradesoap (5 iterations) | 20472ms | 12378ms | 16250ms | 13583ms |
| xalan (10 iterations) | 2877ms | 2847ms | 3071ms | 2875ms |
Conclusion
Good news, two tests Tomcat and tradebeans now pass the bench
OpenJDK 1.7 64bits perform better than OpenJDK 1.7 32bits and OpenJDK 6.
Even if OpenJDK 1.7 32bits performances are better than Apple Java 6, it’s allways behind OpenJDK 1.7 64bits version on OS/X, so you should select the 64bits version if performance is the key for your use.
Next article will cover OpenJDK 1.7 and jtreg, the Regression Test Harness for the OpenJDK platform.
Learn MoreOpenJDK 1.7 for OS/X continuous build with Hudson – Episode 3
Last Updated on Samedi, 4 décembre 2010 11:50 Written by Henri Gomez Vendredi, 26 novembre 2010 09:55
Gildas and I create a project on GoogleCode where we’ll maintain build/package scripts and provide packages.
My Dropbox download page was overloaded and we needed another location, here is it :
http://code.google.com/p/openjdk-osx-build/
Contributors are very welcome, especially OS/X gurus
Learn More