SWT集成chromium

本文档详细介绍了如何在SWT中集成Chromium浏览器渲染器。首先,参照官方文档设置Chromium风格,然后从Eclipse SDK或独立下载库获取所需JAR文件。接着,将这些JAR添加到项目的类路径中,并确保在Eclipse启动配置中设置默认浏览器类型为Chromium。
摘要由CSDN通过智能技术生成

1 参考官方文档

https://www.eclipse.org/swt/faq.php#howusechromium

Q: How do I explicitly use Chromium as the Browser’s underlying renderer?
A: To specify that a Chromium renderer be used by a Browser instance, create it with style SWT.CHROMIUM (@since 4.17) or set the Java property org.eclipse.swt.browser.DefaultType=chromium.
You can get the SWT-Chromium libraries from the Eclipse SDK or from the standalone SWT Chromium support libraries section on the download page.

To use the Chromium libraries from the Eclipse SDK:

Install the CEF binaries in Eclipse from the p2 repo - CEF p2 repo from Make technology
Add the required jars to classpath of project:
SWT-Chromium fragment (org.eclipse.swt.browser.chromium....jar)
SWT fragment (org.eclipse.swt....jar)
CEF binary (com.make.chromium.cef....jar)
To use the Chromium libraries from the standalone SWT downloads:

Get CEF binaries for your platform from the p2 repo:
CEF GTK binaries
CEF Mac binaries
CEF Windows binaries
Add the required jars to classpath of project:
SWT-Chromium standalone jar (swt-chromium.jar)
SWT standalone jar (swt.jar)
CEF binary (com.make.chromium.cef....jar)
To launch Eclipse with Chromium as the default browser type:

Install the CEF binaries in Eclipse from the p2 repo - CEF p2 repo from Make technology
In eclipse.ini, add -Dorg.eclipse.swt.browser.DefaultType=chromium under -vmargs.

2 下载

下载swt, 下载 swt-chromium , 下载 CEF Windows binaries( 比较难).
https://download.eclipse.org/eclipse/downloads/drops4/S-4.17RC1-20

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

随风九天

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值