specifying custom XULRunner installation doesn't work [message #688828] |
Sat, 25 June 2011 22:11 |
Carlo Salinari 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 |
Grant Gayed 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03629 seconds