Arduino IDE fails to start on 64 bit Mountain Lion 10.8.2

Hi,

I did a few hours trying to track this down, but didn't find anything, so I am hoping someone can help.

The situation is that I downloaded the latest versions of the Arduino IDE 1.0.3 and 1.5 beta and attempted to run them on my Mac. The program icon bounces a couple of times and then dissapears. I started a command lion as root and ran the commands:
cd /Applications/Arduino.app/Contents/MacOS/
./JavaApplicationStub

and received these messages:
[JavaAppLauncher Warning] Java application launched from bad stub. Relaunching in 32-bit, and tagging sub-processes to prefer 32-bit with $JAVA_ARCH=i386.
[JavaAppLauncher Error] This process is [i386] and was re-exec'd from [i386], but for some reason we are trying re-exec to [].
[JavaAppLauncher Error] unable to find a version of Java to launch

Here are a few additional pieces of information that pertain:

java -version
java version "1.7.0_10-ea"
Java(TM) SE Runtime Environment (build 1.7.0_10-ea-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

ls /Library/Java/JavaVirtualMachines/
1.6.0_35-b10-428.jdk
1.6.0_37-b06-434.jdk
jdk1.7.0_10.jdk

I've also attached the Java Preference Pane screenshot from Mountain Lion (which doesn't have any other VM's than 1.7 to choose from like it used to in Snow Leopard)... It looks as though Arduino IDE requires 32 bit Java and that I cannot select one.

Help.

Thanks,

Will

Screen Shot 2013-03-03 at 1.22.54 PM.jpg

Hi, Arduino does not require an independent installation of the JVM and I think there may be a conflict between JavaApplicationStub and the Java version in your your library. I run Snow Leopard and the stub gives me this information:

MacBook:MacOS $ file JavaApplicationStub 
JavaApplicationStub: Mach-O universal binary with 2 architectures
JavaApplicationStub (for architecture ppc):	Mach-O executable ppc
JavaApplicationStub (for architecture i386):	Mach-O executable i386

So it's a 32 bit version. I have no solution, just a few hints. You may try disabling the JVM from your Java Preferences, or install a 32 bit JVM, or activate a previous version from the same preferences, or clear your PATH before running JavaApplicationStub from the terminal, or maybe use the finder to locate JavaApplicationStub and double click on it. Some people had success copying the jars in /Contents/Resources/Java under the Extensions directories in /Library/Java, but I believe the different architectures prevent this solution.

Hi decuser, did you resolve this problem? I get exactly the same console messages when I try to start the newly downloaded IDE 1.05 (although I am on OSX 10.5) thanks.

same here :confused:

running 10.8.4, downloaded and installed java 7 dev kit from oracle.
modified it to run bundled apps, so you don't need the apple download...

downloaded 1.0.5, but after launch it dissapears,same for 1.5.2..

after some testing, it seems that version 1.0.3 works,
if i change the stub and add the rxtx 64-bit jni lib...

but newer 1.0.5 / 1.5.2 are now not responding :confused:

to cut a long story short, i made a 1.0.3 vs. 1.0.4 diff and got the two lines...

--- arduino-1.0.3/app/src/processing/app/Base.java	2012-12-10 13:10:40.000000000 +0100
+++ arduino-1.0.4/app/src/processing/app/Base.java	2013-03-11 14:59:54.000000000 +0100
@@ -107,6 +107,11 @@
 
 
   static public void main(String args[]) {
+    initPlatform();
+
+    // run static initialization that grabs all the prefs
+    Preferences.init(null);
+
     try {
       File versionFile = getContentFile("lib/version.txt");
       if (versionFile.exists()) {
@@ -145,8 +150,6 @@
     }
     */
 
-    initPlatform();
-
 //    // Set the look and feel before opening the window
 //    try {
 //      platform.setLookAndFeel();
@@ -166,12 +169,6 @@
     // Make sure a full JDK is installed
     //initRequirements();
 
-    // run static initialization that grabs all the prefs
-    Preferences.init(null);

these 'initPlatform()' and 'Preferences.init(null)' calls must be placed under
'JPopupMenu.setDefaultLightWeightPopupEnabled', maybe we need to just read the comments:

     // Don't put anything above this line that might make GUI,
    // because the platform has to be inited properly first.

1.0.5 and 1.5.2 are working with this small patch on jdk7u25...


/usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home

java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

file JavaApplicationStub 
JavaApplicationStub: Mach-O universal binary with 3 architectures
JavaApplicationStub (for architecture ppc):	Mach-O executable ppc
JavaApplicationStub (for architecture i386):	Mach-O executable i386
JavaApplicationStub (for architecture x86_64):	Mach-O 64-bit executable x86_64

download 1.0.5: arduino-1.0.5-macosx.zip (75.93MB)
download 1.5.2: arduino-1.5.2-macosx.zip (119.40MB)
(right-click-> open, if gatekeeper is active..)