Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » specifying custom XULRunner installation doesn't work
specifying custom XULRunner installation doesn't work [message #688828] Sat, 25 June 2011 22:11 Go to next message
Carlo Salinari is currently offline Carlo SalinariFriend
Messages: 66
Registered: October 2010
Member
Hi,

I'm trying to open an SWT.MOZILLA browser widget to see if I can get a
working WebGL canvas in my swt-based application.

I'm under win 7 64 bit, eclipse indigo 32 bit, firefox 5.0.

The problem is that the Browser() constructor is picking up the wrong
XULRunner installation (i.e. not that of firefox 5.0), and I can't make
it pick the right one.

When I try to run the test program from the faq:
http://www.eclipse.org/swt/faq.php#printmozillapath

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;

public class DisplayMozillaVersion {
public static void main(String[] args) {
Device.DEBUG = true;
Display display = new Display();
Shell shell = new Shell(display);
System.out.println(">>>Snippet creating SWT.MOZILLA-style Browser");
try {
new Browser(shell, SWT.MOZILLA);
System.out.println(">>>succeeded");
} catch (Error e) {
System.out.println(">>>This failed with the following error:");
e.printStackTrace();
System.out.println("\n\nSnippet creating SWT.NONE-style
Browser");
try {
new Browser(shell, SWT.NONE);
System.out.println(">>>succeeded");
} catch (Error e2) {
System.out.println(">>>This failed too, with the
following error:");
e2.printStackTrace();
}
}
display.dispose();
}
}


I get this output:
>>>Snippet creating SWT.MOZILLA-style Browser
XULRunner path: C:\Program Files (x86)\Common Files\Adobe\Adobe
Contribute CS5\App\Configuration\Browsers\Mozilla Run Time
Libraries\dist\bin\xpcom.dll
>>>succeeded


If I try to specify a XULRunner at launch time:
http://www.eclipse.org/swt/faq.php#specifyxulrunner
>eclipse -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath="C:/Program
Files (x86)/Mozilla Firefox"

it is ignored, and I get the same output as above.

If I add the line:
System.setProperty("org.eclipse.swt.browser.XULRunnerPath", "C:/Program
Files (x86)/Mozilla Firefox");

as the first one in the main method of DisplayMozillaVersion, I get the
following error:
>>>Snippet creating SWT.MOZILLA-style Browser
XULRunner path: C:\Program Files (x86)\Mozilla Firefox\xpcom.dll
>>>This failed with the following error:
org.eclipse.swt.SWTError: XPCOM error -2147467261
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:2502)
at org.eclipse.swt.browser.Mozilla.initXPCOM(Mozilla.java:1902)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:700)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:96)
at snippets.Findzilla.main(Findzilla.java:16)


Snippet creating SWT.NONE-style Browser
>>>succeeded


What am I doing wrong?


Thanks,
Carlo
Re: specifying custom XULRunner installation doesn't work [message #689350 is a reply to message #688828] Mon, 27 June 2011 13:30 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Carlo,

The Browser control currently only embeds XULRunner versions < 2.0,
which means Firefox versions < 4.0. So there current isn't a way to do
this. The existing request for support of newer mozilla versions is
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327696 .

Grant


On 6/25/2011 6:11 PM, Carlo Salinari wrote:
> Hi,
>
> I'm trying to open an SWT.MOZILLA browser widget to see if I can get a
> working WebGL canvas in my swt-based application.
>
> I'm under win 7 64 bit, eclipse indigo 32 bit, firefox 5.0.
>
> The problem is that the Browser() constructor is picking up the wrong
> XULRunner installation (i.e. not that of firefox 5.0), and I can't make
> it pick the right one.
>
> When I try to run the test program from the faq:
> http://www.eclipse.org/swt/faq.php#printmozillapath
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.browser.*;
> import org.eclipse.swt.graphics.*;
> import org.eclipse.swt.widgets.*;
>
> public class DisplayMozillaVersion {
> public static void main(String[] args) {
> Device.DEBUG = true;
> Display display = new Display();
> Shell shell = new Shell(display);
> System.out.println(">>>Snippet creating SWT.MOZILLA-style Browser");
> try {
> new Browser(shell, SWT.MOZILLA);
> System.out.println(">>>succeeded");
> } catch (Error e) {
> System.out.println(">>>This failed with the following error:");
> e.printStackTrace();
> System.out.println("\n\nSnippet creating SWT.NONE-style
> Browser");
> try {
> new Browser(shell, SWT.NONE);
> System.out.println(">>>succeeded");
> } catch (Error e2) {
> System.out.println(">>>This failed too, with the
> following error:");
> e2.printStackTrace();
> }
> }
> display.dispose();
> }
> }
>
>
> I get this output:
>>>> Snippet creating SWT.MOZILLA-style Browser
> XULRunner path: C:\Program Files (x86)\Common Files\Adobe\Adobe
> Contribute CS5\App\Configuration\Browsers\Mozilla Run Time
> Libraries\dist\bin\xpcom.dll
>>>> succeeded
>
>
> If I try to specify a XULRunner at launch time:
> http://www.eclipse.org/swt/faq.php#specifyxulrunner
>> eclipse -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath="C:/Program
> Files (x86)/Mozilla Firefox"
>
> it is ignored, and I get the same output as above.
>
> If I add the line:
> System.setProperty("org.eclipse.swt.browser.XULRunnerPath", "C:/Program
> Files (x86)/Mozilla Firefox");
>
> as the first one in the main method of DisplayMozillaVersion, I get the
> following error:
>>>> Snippet creating SWT.MOZILLA-style Browser
> XULRunner path: C:\Program Files (x86)\Mozilla Firefox\xpcom.dll
>>>> This failed with the following error:
> org.eclipse.swt.SWTError: XPCOM error -2147467261
> at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:2502)
> at org.eclipse.swt.browser.Mozilla.initXPCOM(Mozilla.java:1902)
> at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:700)
> at org.eclipse.swt.browser.Browser.<init>(Browser.java:96)
> at snippets.Findzilla.main(Findzilla.java:16)
>
>
> Snippet creating SWT.NONE-style Browser
>>>> succeeded
>
>
> What am I doing wrong?
>
>
> Thanks,
> Carlo
Re: specifying custom XULRunner installation doesn't work [message #689389 is a reply to message #689350] Mon, 27 June 2011 14:42 Go to previous messageGo to next message
Carlo Salinari is currently offline Carlo SalinariFriend
Messages: 66
Registered: October 2010
Member
On 6/27/2011 3:30 PM, Grant Gayed wrote:
> Hi Carlo,
>
> The Browser control currently only embeds XULRunner versions < 2.0,
> which means Firefox versions < 4.0. So there current isn't a way to do
> this. The existing request for support of newer mozilla versions is
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=327696 .

I see, thanks for the pointer.

Is it much work to implement support for xulrunner >= 2?
Which parts of swt should be modified/updated?

Carlo
Re: specifying custom XULRunner installation doesn't work [message #689838 is a reply to message #689389] Tue, 28 June 2011 13:33 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
This would be a bigger effort than previous xulrunner release catch-ups.
I believe this release contained many more interface changes than
previous ones, and may even require that a separate swt library be
shipped for it (I think this is the case because attempts to use
XULRunner 2.0 with the current swt library have crashed on the first C
call). I think that for this to be done it needs to appear as an
eclipse plan item with time allocated for it.

Grant


On 6/27/2011 10:42 AM, Carlo Salinari wrote:
> On 6/27/2011 3:30 PM, Grant Gayed wrote:
>> Hi Carlo,
>>
>> The Browser control currently only embeds XULRunner versions< 2.0,
>> which means Firefox versions< 4.0. So there current isn't a way to do
>> this. The existing request for support of newer mozilla versions is
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=327696 .
>
> I see, thanks for the pointer.
>
> Is it much work to implement support for xulrunner>= 2?
> Which parts of swt should be modified/updated?
>
> Carlo
Previous Topic:StackLayout Problem
Next Topic:Export jar for 32-bit Machine from 64-bit machine
Goto Forum:
  


Current Time: Sat Apr 20 15:14:18 GMT 2024

Powered by FUDForum. Page generated in 0.03830 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top