Closed Bug 262453 Opened 16 years ago Closed 2 years ago

Embedding Firefox


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: christophe_cornu, Unassigned)


User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: 

Currently, the java SWT Browser widget on Linux embeds Mozilla. Attempts to 
embed genuine Firefox builds did not succeed - presumably because Firefox is 
statically linked and does not ship with GRE.

I'm opening that bug report so that if and when the Firefox team decides to 
support the embedding scenario we can be notified and consider Firefox 
support. If future Linux distributions only ship Firefox, this is going to 
make the embedding scenario much more complicated - requiring users to 
download separately the Mozilla/GRE.

Any workaround or tip on how to make it work with the current build is always 
welcome :-) Would there be a way for embedders to use the XPCOM Glue to still 
be able to embed Firefox?

Thank you,


Reproducible: Always
Steps to Reproduce:
Hi Darin,

I've seen your comment in the thread at:

And when you helped us with Mozilla 1.7:

We're getting requests for Firefox support now that it is out. Hope we can 
work this out in the future.

Summary: Embedders can embed Mozilla that ships with a GRE. Embedders would like to be able to use Firefox too. → Embedding Firefox
Assignee: firefox → dougt
Component: General → Embedding: GRE Core
Product: Firefox → Browser
QA Contact: firefox.general
Version: unspecified → Trunk
no sipaq, this is a firefox-specific bug, due to the way ffox is
compiled/shipped (statically linked -> no gre)
Assignee: dougt → bryner
Component: Embedding: GRE Core → Build Config
Product: Browser → Firefox
QA Contact: asa
Ever confirmed: true
> We're getting requests for Firefox support now that it is out. Hope we can 
> work this out in the future.

Hi Chris,

Yeah, we expect this sort of request to come up more and more frequently as
Firefox increases in popularity.  At the moment, it is not possible to embed the
official releases of Firefox.  One could create their own version of
Firefox that did not statically link to Gecko, but that is not the default
configuration used by  Firefox has a narrowly defined objective: to
be the best web browser it can be, and the static build helps reduce codesize
and improve performance.

That said, I'm hopeful that we will be able to transition Firefox to use a
shared copy of Gecko in some manner so that the Gecko that ships with Firefox
can be used by embedders.  There's no chance of that happening before Firefox
1.0 though.
It's been a while since the last update on this; what's the current status?
I agree, I think really what Eclipse Community would like to know is how the 
licensing for XULRunner will work.

Is it possible to get more clarity on how the licensing will work?
( ) especially for Scenario A.

Are you guys going to start including in the standard FF linux builds?

We use SWT + FF in our product and it won't run on other peoples' machines because they don't have in their FF dist.  So not only do we have to use a custom build of FF for our own purposes, but we will have install one on every customer's machine too (which they won't appreciate).  Then if they upgrade, our product will mysteriously stop working.
Assignee: bryner → nobody
QA Contact: asa → build.config
Hey, looks like mozembed is part of the build now.  Maybe someone can close this bug...
er... part of Xulrunner, I mean.

I am a newbie and would like to understand how we can embed Firefox in a Java application using JDIC?  Is there a fix/workaround for this bug?

On Windows with installed IE, but Firefox as Standard-Browser you can modify the browser-validation of jdic:

Modify the function "isDefaultBrowserMozilla()" in "" from 

Here is the complete modified code:

     * Checks if the default browser for the current platform is Mozilla.
     * @return true on Solaris and Linux and true on Windows platform if Mozilla
     * (not Firefox) is set as the default browser.
    public static boolean isDefaultBrowserMozilla() {
        String osName = System.getProperty("").toLowerCase();

        if ((osName.indexOf("solaris") >= 0) ||
            (osName.indexOf("linux") >= 0) ) {
            return true;
        } else {
            String nativeBrowserPath = getBrowserPath();
            if (nativeBrowserPath.indexOf("firefox") >= 0) {
            	System.err.println("it's firefox!");
           	return false;
            } else if (nativeBrowserPath.indexOf("mozilla") >= 0) {
            	return true; 
            } else {
              return false;

Compile and put it into jdic.jar.
This function will now return false on Windows with Firefox as standard-browser.

It's not very pretty, but it works.

Another way is to use JDICplus ;)

It is not the way, how to embed Firefox using jdic (it is not possible yet)!
It is a workaround for how to use jdic-browser on Windows with installed IE, and Firefox configured as standard-browser!
I'm going to close this bug as it is really old and I don't believe is relevant anymore.  As a matter of open source worlds colliding I used to work with Chris at IBM and I know he no longer works on SWT.
Closed: 2 years ago
Resolution: --- → WONTFIX
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.