Monday, December 28, 2009

Disabling Firefox Preview in Aptana

Eclipse uses xulrunner to embed mozilla firefox within SWT applications. Unfortunately, xulrunner does not work with 64 bit cocoa (cocoa-x64). I'm trying to do Palm Pre development, so I don't need to preview my html in firefox. In fact, previewing in Safari is probably better anyway since, like the pre browser, it is webkit-based.

To disable Firefox preview, and stop errors like this:
(Build 1.2.7.024747) [ERROR] Unable to create Firefox browser control
No more handles (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-xulrunner-cocoa-3624 in java.library.path
no swt-xulrunner-cocoa in java.library.path
Can't load library: /var/folders/Az/Az+0r2ubHtm3wMGMatRuQE+++TI/-Tmp-/swtlib-64/libswt-xulrunner-cocoa-3624.jnilib
Can't load library: /var/folders/Az/Az+0r2ubHtm3wMGMatRuQE+++TI/-Tmp-/swtlib-64/libswt-xulrunner-cocoa.jnilib
)
and this:
(Build 1.2.7.024747) [ERROR] (Build 1.2.7.024747) [ERROR] Unable to create Firefox browser control
No more handles [Could not detect registered XULRunner to use]
Go to the Window->Preferences->Aptana->Editors->HTML->Preview preference page and uncheck Firefox.

If you want to use xulrunner with eclipse out of the box, you must use eclipse carbon 32-bit. If you want to be a little more adventurous, an aptana bug report claims that xulrunner is a universal binary and runs on carbon and cocoa 32-bit. I haven't tried to verify this.

No comments: