Pages: [1]   Go Down
Author Topic: Java 6 Launch Error on Mac  (Read 1755 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure if anyone has come across this yet but Arduino 11 will not launch when Java 6 is the default JVM on Mac.
The error is as follows:

Cannot launch Java application
Uncaught exception in main method: java.lang.UnsatisfiedLinkError: /Applications/arduino-0011/Arduino 11.app/Contents/Resources/Java/librxtxSerial.jnilib:


Switching to Java 5 makes everything ok. From what I have read this is because Java 6 is 64bit only and requires all native libraries to also be 64bit.

To avoid this error in future releases it might be an idea to change the Info.plist JVMVersion property from 1.4+ to 1.4*
That way rather than the latest version being used, the latest version of 1.4.x is used.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the report and the suggested fix.  I'll put it into the next version.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually, does anyone know how far back in Mac OS X there's support for Java 5.  Is it available on 10.3.9?  That way I can change the property to 1.5, instead of 1.4.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Actually, does anyone know how far back in Mac OS X there's support for Java 5.  Is it available on 10.3.9?  That way I can change the property to 1.5, instead of 1.4.
Just from a quick search it looks like 1.5 is not officially supported in Panther (10.3). Not sure there is any great advantage to running it on 1.5 is there? Although I note Processing is now 1.5...

The other thing you can do is use retroweaver to turn your fancy code to 1.4 compliant code: http://retroweaver.sourceforge.net/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone know of a way to tell Arduino.app to run under a particular version of Java, while keeping 1.6 as the default JDK?

Got a few other Java bits that would really benefit from a 1.6 default.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah, editing JVMVersion in info.plist does the trick. Cool.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

color me clueless, but where is this info.plist? there are about 100 of them on my mac...
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually there's a much simpler way;

just right-click Arduino.app -> Get Info

then check the "Open in 32 bit mode" option under 'General'.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks, i figured this out about five minutes after posting, now if only I could get the IDE to work... http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248563924/0
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, after I clicked the "Open in 32 Bit Mode" checkbox I get a new error-message: "Cannot launch Java application Uncaught exception in main method: java.lang.NumberFormatException: null"

Any idea what could be the problem?
Thanks!
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

tege: what version of Arduino are you running?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried all versions from 12 to 17. 17 is working but makes some problems communicating with max/mso under version 17…
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You might need to delete your Arduino preferences file (you can find the location in the preferences dialog).  Then run Arduino 0016 (not 0017) to recreate the preferences file.  (If you run Arduino 0017 first, Arduino 0016 will have trouble with the preferences file that gets created.)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's it! Thanks a lot!!
Logged

South Africa & UK
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You might need to delete your Arduino preferences file (you can find the location in the preferences dialog).  Then run Arduino 0016 (not 0017) to recreate the preferences file.

hey i am stuck on the solution above.
I am  confused where "the arduino preferences" is. if it is the folder within "show package content", it tried deleting that Arduino 16 wouldn't even open.

thanks,
robz
Logged

Pages: [1]   Go Up
Jump to: