I am trying to create an application using SWT Browser. Is it possible to integrate Google Chrome as browser into Eclipse (not as external web browser)?
-
1[A blog talks about it](http://tasktop.com/blog/eclipse/living-inside-eclipse-embedding-browsers-and-google-chrome) but a proper roadmap for embedding it is still not quite clear to me – AurA Jun 13 '12 at 09:46
-
Isn't webkit already part of Eclipse, and that you can browse inside of eclipse... – quarks Jun 13 '12 at 09:46
-
webkit is not included on windows. You have to either install XULRunner to use with Firefox or the WebKit available with Safari. I've been unable to get this working with Chrome on windows. If you need help getting firefox or safari working on Windows - let me know, I've got those working - at least up to the latest supported versions in Eclipse Juno. – ssnyder Jul 03 '12 at 16:48
5 Answers
No, as of current stable release of google chrome, you cannot use it inside SWT. The reason is that google chrome (and essentially chromium) doesn't support ActiveX (like IE, Firefox, Safari etc) but is based on NPAPI. (Note: I am considering that you are working on Windows machine as you haven't mentioned in your question !!)
But there are projects which are trying to make an embeddable version of chromium. See these links:
You can set it through Eclipse UI.
Goto : Window > Preferences > General > Web Browser
Select "Use External Browser" radio button
Click "New" button to add a new browser eg. Chrome !
Click Apply + Ok
... and you have it working !

- 37
- 1
-
but ofcourse i have not tried it for SWT projects, I was working for a web application. – Kaustubh Dixit Apr 20 '13 at 05:43
-
sorry guys - i later realized that this question was not for "external browsers" - my miss :( sorry again ! – Kaustubh Dixit Apr 20 '13 at 05:46
-
I know your answer is a miss to the OPs requirements but I came across this searching and it is a hit for me. – Ahmed Akhtar Nov 22 '18 at 06:50
Bug 405031 - [Browser] implement Chromium support

- 430
- 2
- 11
-
1This request lead to this project: https://github.com/maketechnology/chromium.swt – Jose Renato May 03 '19 at 19:31
If you can not make it through UI, Try to edit settings in the following file.
YOUR-WORKSPACE\.metadata\.plugins\org.eclipse.core.runtime\.settings
there will be a file called org.eclipse.ui.browser.prefs
open it with any text editor and change the appropriate values, It is self descriptive you can easily find out what to change and all. Have a back up of the same before you modify.
Hope this helps you.
EDIT: Restart your eclipse to effect the above change.

- 5,827
- 2
- 27
- 46
-
@Downvoter, Could you tell me the reason for downvote, so that I can improve my answers next time. – RP- Jun 15 '12 at 05:25
-
You said `change appropriate values` but what are those? In my setting file I could only see `1)` eclipse.preferences.version and `2)` internalWebBrowserHistory. Please update your answer with correct values and I will take my down-vote back. Apart from that google-chrome doesn't support embedding. – Favonius Jun 15 '12 at 06:16
To integrate Chromium into Eclipse or SWT applications you can use https://github.com/equoplatform/chromium-swt.
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 13 '22 at 13:31