Monday, January 5, 2009

Netbeans will not start on OS X

Back from a two week break, finished with at least the first pass of mail and attempting to get back to inbox zero I find that I cannot start NetBeans 6.1 or 6.5. It appears that the problem is an OS X update forcing the use of 64-bit data model when the 32-bit is required.

In various locations I found instructions to change to the 32-bit data model with -d32. After adding this change to netbeans.conf (alternatively -d32 or -J-d32) the problem was not resolved.

An ugly hack to work around this issue (inspiration from Sam Cogan):

lipo /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java \
   -remove x86_64 -output /tmp/java
sudo mv /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java \
sudo mv /tmp/java /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java-32
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java-32 \

This appears to have fixed the immediate symptom, there is no telling what I have broken in some other insidious ways. I also expect this problem to return with the next update to java which replaces the java binary.

Ways to identify this problem:

From the open /Applications/NetBeans/NetBeans\
LSOpenFromURLSpec() failed with error -10810 for the file /Applications/NetBeans/NetBeans
From CrashReporter files for java: 
Process:         java [5579]
Path:            /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java
Identifier:      java
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [5421]
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread:  0
Thread 0 crashed with X86 Thread State (64-bit):
In: /var/log/system.log
1/5/09 3:05:41 PM [0x0-0x133133].org.netbeans.ide[5610] /Applications/NetBeans/NetBeans line 493:  5768 Segmentation fault      "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java" ...

No comments:

Post a Comment