Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsspecifying custom XULRunner installation doesn't work
https://www.eclipse.org/forums/index.php/mv/msg/215839/688828/#msg_688828
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.
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.
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
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)
Thanks,
Carlo]]>Carlo Salinari2011-06-25T22:11:04-00:00Re: specifying custom XULRunner installation doesn't work
https://www.eclipse.org/forums/index.php/mv/msg/215839/689350/#msg_689350
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]]>Grant Gayed2011-06-27T13:30:05-00:00Re: specifying custom XULRunner installation doesn't work
https://www.eclipse.org/forums/index.php/mv/msg/215839/689389/#msg_689389
> 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]]>Carlo Salinari2011-06-27T14:42:31-00:00Re: specifying custom XULRunner installation doesn't work
https://www.eclipse.org/forums/index.php/mv/msg/215839/689838/#msg_689838
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]]>Grant Gayed2011-06-28T13:33:50-00:00