Featured image of post OpenJDK 7 on OSX and IntelliJ IDEA EAP

OpenJDK 7 on OSX and IntelliJ IDEA EAP

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.


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 :

[bash] export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home /Applications/IdeaX-IU-106.396.app/bin/idea.sh [/bash]

And I could see a Swing based application running on OpenJDK 7 and OS/X.

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy