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 \\
   /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java-x86_64
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 \\
   /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java

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 terminal.app: open /Applications/NetBeans/NetBeans\\ 6.5.app
LSOpenFromURLSpec() failed with error -10810 for the file /Applications/NetBeans/NetBeans 6.5.app
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 Type:  EXC_BAD_ACCESS (SIGSEGV)
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 6.5.app/Contents/MacOS/../Resources/NetBeans/bin/../platform9/lib/nbexec: line 493:  5768 Segmentation fault      "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java" ...
Comments:

Hi you wouldn't by any chance be using airfoil and instant hijack? Try running "sudo /usr/local/hermes/bin/hermesctl unload" and see if you can run NB in 64 java again after that.

Posted by Kasper on February 12, 2009 at 12:35 AM EST #

Hi you wouldn't by any chance be using airfoil and instant hijack? Try running "sudo /usr/local/hermes/bin/hermesctl unload" and see if you can run NB in 64 java again after that.

Posted by Kasper on February 12, 2009 at 12:36 AM EST #

I was going to say no, but I realize that I had tried it. It appears that I have some cruft left behind.

Unloading hermes and reverting to the x86_64 java binary and netbeans works. Thanks

Removed:
rm /Library/LaunchDaemons/com.rogueamoeba.hermes.plist
rm -rf /usr/local/hermes

Posted by Shawn Ferry on February 12, 2009 at 03:10 AM EST #

Post a Comment:
Comments are closed for this entry.
About

yakshaving

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Sun Managed Operations