« Cultural Interlude | Main | Make it faster! »
April 08, 2006
Broken Java applications on OS X - Intel Mac
I left off trying to get the Firefox extension, Piggy Bank, to run. This post describes my journey to get it working again.
After the Piggy Bank install, I was supposed to restart Firefox and then some sort of wizard was supposed to appear. But it didn't. Instead it crashes. Grrrr.
I thought, "Maybe it's because I've got this new dual-core Intel processor in my Mac...? Probably not, but this is crazy enough to arouse superstition." Little did I know, I was right.
First, I discovered that there is a known issue with Piggy Bank on Mac OS X. The solution is to let the installer run for a long time, because the problem is simply caused by a slow installer script. I let mine run for an hour, but it sitll didn't work.
- I noticed that I still had java 1.4.2. I upgraded to java 1.5 for Mac OS X Tiger but that still didn't help.
- At this point I noticed that my JBuilder & Eclipse were also fried. These java applications would simply hang (like Firefox does) when I tried to open them. Oddly, using java in the Terminal seemed to work fine.
- I tried setting JAVA_HOME, CLASSPATH and PATH environment variables, like this:
setenv JAVA_HOME /System/Library/frameworks/JavaVM.framework/Home
Then, I put it in my login script like this:
cd ~
vi .login
setenv JAVA_HOME /System/Library/frameworks/JavaVM.framework/Versions/1.5/Home
setenv PATH $JAVA_HOME/bin:$PATH
There, now each time when you log in and echo $JAVA_HOME, you get the correct path. You also get the correct path when you go "which java" and "java -version". (References: Mac OS X & Java: Where's my $JAVA_HOME? and Better MacOSX Java 1.5 Installation
Unfortunately, that didn't help either.
Then I found out that 64-bit Eclipse does need a 64-bit JRE, but I didn't know how to tell if I have a 64-bit JRE or not. (My husband later pointed out to me that I have 2 32-bit processors, so, no, I didn't need the 64-bit JRE anyway.)
I did some digging into crash files. Here's what I got:
On Eclipse:
java.lang.UnsatisfiedLinkError: /Applications/eclipse/configuration/org.eclipse.osgi/bundles/63/1/.cp/libswt-pi-carbon-3139.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1495)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
at org.eclipse.swt.internal.carbon.OS.
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:856)
at org.eclipse.swt.widgets.Display.create(Display.java:836)
at org.eclipse.swt.graphics.Device.
at org.eclipse.swt.widgets.Display.
at org.eclipse.swt.widgets.Display.
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:394)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:155)
at org.eclipse.ui.internal.ide.IDEApplication.createDisplay(IDEApplication.java:128)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:79)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
On JBuilder:
Java for ppc cannot run in this configuration.
Please consult documentation.
VM creation failed.
On Firefox:
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
The JBuilder note was the most helpful. It seemed to confirm that something at the java level was designed for the PowerPC processor.
I re-installed Mac OS X Tiger again (using Archive & Install), did the Software Update again. Still nothing.
Then I read a blog posting (I will try to find it again so I can link it) that told me to check the info window on my java applications. Ahhhh, HA!!!!!!!!!!!!! (see how it says that the app is for the PowerPC processor? LOL)

Next, I read that there is a different version of eclipse that supports Intel Macs. Kewl. I followed the link to download it.
114 MB Dowload later: HOLY DOODLES!!!!!!!!!! It frickin' worked.
*sobs of joy*
And it only took 7 hours.
Now to install Firefox for my Intel Mac.
Posted by slb534 at April 8, 2006 01:09 PM
Comments
Hey, Thanks for the "help" kind of - I found your page on Google and am installing the new Eclipse - I just got a new Mac Book, and my world is turned upside down.
I figure you might be able to help me with some more technical questions I have. If you could IM/e-mail me that woud be awesome...
EmoKid5117 is the SN.
Talk to you soon,
Aaron
Posted by: Aaron at April 12, 2006 11:27 PM
Hello Aaron,
Cool, I'm glad you found this information helpful! If you have any other questions you are welcome to post them, but I don't know if I'll be able to help.
Have fun with Eclipse and with your new Mac Book!
Steph
Posted by: Steph at April 15, 2006 09:42 AM
Thanks!
Kind of frustrated for a while there, going to try the 3.2rc3 now, seems to be the stable one at the moment. Crossing fingers, hoping all the plugins I use will work too :)
Posted by: Anders at May 12, 2006 04:50 PM
Steph, thank you!!! Your seven hours of legwork is greatly appreciated!
Posted by: Russell at May 12, 2006 09:26 PM
Thanks! I was having problems with a new iMac, and this solved it.
Posted by: Dave at June 13, 2006 10:19 AM