FS#5149 - Java/SWT apps can't find mozilla/firefox to use as internal browser

Attached to Project: Arch Linux
Opened by asd asd (izaak) - Wednesday, 02 August 2006, 18:23 GMT
Last edited by Greg (dolby) - Tuesday, 17 June 2008, 19:29 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Jason Chu (jason)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

This applies to all Java/SWT applications which can make use of an internal browser. IE: rssowl for viewing news articles as HTML, or eclipse for viewing documentation, etc.

The trick is to set the following environment variables before running such applications:

export MOZILLA_FIVE_HOME=/opt/mozilla/lib/firefox
export LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME}

I don't know the correct way to integrate this into Arch Linux. However I think it's important, as it enriches the out-of-the-box experience for anyone using these applications.
This task depends upon

Closed by  Greg (dolby)
Tuesday, 17 June 2008, 19:29 GMT
Reason for closing:  Fixed
Comment by Benoit C (benoitc) - Thursday, 10 August 2006, 13:21 GMT
same error on eclipse 3.2-1 :


!ENTRY org.eclipse.osgi 4 0 2006-08-10 15:20:45.584
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HO
ME not set)]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:136)
Comment by Benoit C (benoitc) - Thursday, 10 August 2006, 13:22 GMT
btw the trick solve the problem.
Comment by Roman Kyrylych (Romashka) - Wednesday, 22 November 2006, 21:58 GMT
You should place those exports in /etc/profile.d/java.sh (for example) and set executable bit on it.
IMO it's not good idea to install this file with jre, because not everyone have firefox as their browser. Maybe wiki page would be better. :-/
Comment by Jan de Groot (JGC) - Wednesday, 22 November 2006, 23:16 GMT
So how would seamonkey like it to have MOZILLA_FIVE_HOME pointing to firefox, or xulrunner, or whatever? Also, how would xulrunner handle firefox 2.0 libraries? This is the main reason why we don't export these things.

All C/C++ apps that link to mozilla libraries have the xulrunner library path linked into the binary. For java programs, this would mean a nice LD_LIBRARY_PATH environment setting from the script that launches these apps. As we have a launcher script for every java app anyways, these things would go into the launcher, not in a /etc/profile.d script.
Comment by Ivan Levchenko (ivan) - Wednesday, 06 June 2007, 16:35 GMT
I am having the same issue with Aptana (http://www.aptana.com/) it was looking for libxpcom.so. To fix this issue, i make a launcher script exporthing just the MOZILLA_FIVE_HOME variable with /opt/mozilla/lib/firefox. I really do think that at least a post install message should be put in the eclipse package so that every person would be aware of this issue.
Comment by Jan de Groot (JGC) - Sunday, 26 August 2007, 14:34 GMT
SWT is fixed to link against the correct binaries (xulrunner in this case). The only thing needed now is to provide the packages with a valid MOZILLA_FIVE_HOME.
Comment by Dan (piojo) - Saturday, 29 December 2007, 06:09 GMT
Is there a compelling reason not to put the mozilla libraries in /usr/lib/firefox, where all these other apps expect them to be? See this page for a bit more information: https://bugs.launchpad.net/ubuntu/+source/mozilla-firefox/+bug/157126
Perhaps we could change firefox's installation path? I just don't see why we need to break all these other applications. (Sorry, I'm a little upset that I spent a day trying to figure out why an app was segfaulting, and MOZILLA_FIVE_HOME turned out to be the answer.)
Comment by Jan de Groot (JGC) - Saturday, 29 December 2007, 09:43 GMT
We're actually in the process of moving mozilla and friends to /usr, where firefox will live in /usr/lib/firefox and xulrunner will live in /usr/lib/xulrunner.
Comment by Roman Kyrylych (Romashka) - Saturday, 09 February 2008, 15:02 GMT
mozilla is now in /usr, can this be closed?
Comment by Greg (dolby) - Sunday, 04 May 2008, 15:13 GMT
is this still an issue?
Comment by Dan (piojo) - Sunday, 04 May 2008, 18:23 GMT
I experienced this problem with a gnome library (not Java), and the problem that I experienced is no longer an issue. I cannot vouch for the Java situation.

Loading...