SamCogan.com

OSX Java Problem – LSOpenFromURLSpec() Failed

I was getting netbeans crashing with this error today, so looking into I found its down to the latest update for Java causing the JVM to try and run 64bit code, on 32 bit systems, which it doesn’t like, and crashes.
So the following commands in the terminal fixed it for me. Bear in mind this has to be done as root, so consider the consequences!
Open Terminal.app, become root (sudo -s) and run the following commands.
(The ‘#’ is the shell prompt showing that we’re running as root)

# cp -p /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java /tmp/java_original_binary
# lipo /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java  -remove x86_64  -output /tmp/java
# cat /tmp/java > /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java

Tags: ,

This entry was posted on Wednesday, December 17th, 2008 at 8:35 am and is filed under OSX. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

7 Responses to “OSX Java Problem – LSOpenFromURLSpec() Failed”

  1. YakShaving: Shawn Ferry's Weblog Says:

    January 5th, 2009 at 4:45 pm

    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.

    …sudo mv /tmp/java /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/b…

  2. Rob Says:

    January 7th, 2009 at 8:39 pm

    I don’t know what the hell that is, but it was the end of 7 hours of fruitless fiddling. Thanks a lot!

  3. The Wizard Says:

    January 25th, 2009 at 5:27 am

    Perfect solution. THANKS

  4. Adam S Says:

    February 12th, 2009 at 11:25 pm

    This solutions worked for me! I couldn’t launch Netbeans 6.5 or 7.0M1. Thanks!

  5. web.dev » Running NetBeans 6.7 on Mac OS X Says:

    July 1st, 2009 at 7:06 pm

    [...] all I got was “LSOpenFromURLSpec() failed with error …”. Luckily there’s this blog with a decent solution: 1. open Terminal.app and log in as root (sudo -s) 2. enter this: # cp -p [...]

  6. Dan K Says:

    August 21st, 2009 at 9:50 pm

    Thank you! Saved my ass.

  7. First look at open source IntelliJ « LSD::RELOAD Says:

    October 16th, 2009 at 4:16 pm

    [...] Mac OS X I run into 64 bit problems. Falling back to a 32-bit version of JDK 5.0 works for me…seems like jetbrains may have just fixed [...]

Leave a Reply


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>