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)?
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 !
Bug 405031 - [Browser] implement Chromium support
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.
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. –
Rationale To integrate Chromium into Eclipse or SWT applications you can use https://github.com/equoplatform/chromium-swt.
© 2022 - 2024 — McMap. All rights reserved.