Getting the Arduino IDE running on Mac OS X with 64-bit Java
January 29th, 2009 | Published in tip
The other day I ordered an Arduino Duemilanove from Maker Shed and in anticipation of its arrival I went and downloaded the Arduino software to play around with. I ran it and immediately got this error, which has been reported a number of times in the forums and mailing lists:
java.lang.UnsatisfiedLinkError: /Users/kylesm/Downloads/arduino-0012/Arduino 12.app/Contents/Resources/Java/librxtxSerial.jnilib: thrown while loading gnu.io.RXTXCommDriver
I tried rebuilding rxtx with 64-bit support as documented here and here and then overwrote the copy that shipped with Arduino but continued to get the same error. I then got the idea of copying the library and JAR from Processing (upon which it’s based) since that works just fine. Same error.
The final trick was to edit the Info.plist for the app and change the value for the JVMVersion property to 1.5* (which is what Processing does) and it worked perfectly because the 32-bit version of the JDK 1.5 is my second choice in the Java Preferences app:

So in the end I couldn’t get it working with a 64-bit JVM and didn’t need to rebuild rxtx, but thankfully Apple includes just about every version it’s ever produced so it wasn’t a big deal.
The problem is primarily due to the fact that the Arduino IDE uses a native library that was built without 64-bit support and I’ve got Apple’s 64-bit JVM set as my default for work.
