Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using the SWT browser widget to develop an application in Java with Eclipse ("Kepler").

Now I want to use the Mozilla API and downloaded the latest sdk from XULRunner from this site: http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/latest/

How can I tell Eclipse to use XULRunner so I can use the following code line?

browser = new Browser(shell, SWT.MOZILLA);

Any suggestions on the same are highly appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
121 views
Welcome To Ask or Share your Answers For Others

1 Answer

SWT is not supporting 'latest' XULRunner.
See Bug 327696 – [Browser] implement support for xulrunner >= 4.0

See also The SWT FAQ, Q: How do I specify the default type of native renderer that is used by the Browser? or Q: How do I explicitly use Mozilla as the Browser's underlying renderer? or so.

For example,

  1. Download the last one which is available on eclipse from http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/10.0.4esr/sdk/
  2. Extract it to C:
  3. Edit your app's Run Configuration->Arguments->VM Arguments, add following argument. -Dorg.eclipse.swt.browser.XULRunnerPath=C:xulrunner

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...