Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() always retunrs null(nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() always retunrs null)
icon5.gif  nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() always retunrs null [message #908802] Thu, 06 September 2012 03:00 Go to next message
Rahul Chandrashekar is currently offline Rahul Chandrashekar
Messages: 43
Registered: July 2009
Member
Dear All,

I have been trying to get the instance of the Mozilla WebBrowser

nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() and i have executed a lot of examples and always the value os

nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() always null

I have executed the below examples from Eclipse SWT Snippet

1. Snippet 267
2. Snippet 306
3. Snippet 362

The end results are always same.

Please let me know what am i missing.

I have downloaded XULRunner and have also configured the required MozillaInterfaces.jar files and have also done a global registry of XUL.

Please let me know how to proceed on the same.

Best Regds
Rahul Chandrashekar.
Re: nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() always retunrs null [message #909138 is a reply to message #908802] Thu, 06 September 2012 15:45 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
Hi Rahul,

It's hard to say what the problem is, I have not heard of this failing
before if everything in
http://www.eclipse.org/swt/faq.php#howusejavaxpcom is followed. Some
things for you to verify:

- You are using the XULRunner installation that you think you're using.
To verify this make the first line of your app "Device.DEBUG = true;",
and ensure that your XULRunner's path gets written to stdout when the
first mozilla-based Browser instance is created.

- Your XULRunner is working for you in general (eg.- setUrl() works, etc.)

- Your XULRunner's version is 1.8.1.2 <= version < 2.0. This is not
expected to work with XULRunner 10.x.

- If your XULRunner provides a MozillaGlue.jar file then it must be on
your build path.

Do any of these ideas help?
Grant


On 9/5/2012 11:00 PM, Rahul Chandrashekar wrote:
> Dear All,
>
> I have been trying to get the instance of the Mozilla WebBrowser
> nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() and i
> have executed a lot of examples and always the value os
>
> nsIWebBrowser webBrowser = (nsIWebBrowser)browser.getWebBrowser() always
> null
>
> I have executed the below examples from Eclipse SWT Snippet
>
> 1. Snippet 267
> 2. Snippet 306
> 3. Snippet 362
>
> The end results are always same.
>
> Please let me know what am i missing.
>
> I have downloaded XULRunner and have also configured the required
> MozillaInterfaces.jar files and have also done a global registry of XUL.
>
> Please let me know how to proceed on the same.
>
> Best Regds
> Rahul Chandrashekar.
Previous Topic:"window.external.callJava is not a function" error when invoking BrowserFunction in JS
Next Topic:Regarding SWT Spinner
Goto Forum:
  


Current Time: Wed Oct 01 00:01:52 GMT 2014

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

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