在 Java 应用程序中嵌入 Web 浏览器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/943927/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Embed a web browser within a java application
提问by
Possible Duplicate:
Is there a way to embed a browser in Java?
可能的重复:
有没有办法在 Java 中嵌入浏览器?
how can i embed a web browser within a java application?
如何在 Java 应用程序中嵌入 Web 浏览器?
Thanks, David
谢谢,大卫
回答by Robert Munteanu
You can use SWT for this, here's a simple example.
您可以为此使用 SWT,这是一个简单的示例。
回答by Michael Borgwardt
There are a number of alternatives:
有多种选择:
- JEditorPane- included in the JRE, but only renders simple HTML
- JDIC- open source, embeds native browser
- ICEBrowser- commercial, renders the HTML in Java
- WebRenderer- commercial, embeds native browser in Java
- JEditorPane- 包含在 JRE 中,但只呈现简单的 HTML
- JDIC- 开源,嵌入原生浏览器
- ICEBrowser- 商业,用 Java 呈现 HTML
- WebRenderer- 商业,在 Java 中嵌入本机浏览器
And a few more that don't seem to be under active development.
还有一些似乎没有在积极开发中的。
回答by J-16 SDiZ
回答by willcodejavaforfood
回答by adrian.tarau
Flying Sauceris small and renders pretty well regularHTML pages
Flying Saucer很小并且可以很好地呈现常规HTML 页面
回答by Horcrux7
If you need a pure Java solution then you can use JWebEngine. Its the best pure Java solution currently available.
如果您需要纯 Java 解决方案,那么您可以使用JWebEngine。它是目前可用的最好的纯 Java 解决方案。
回答by Christopher Deckers
You could also try the JWebBrowser from DJ Native Swing: http://djproject.sourceforge.net/ns
您也可以尝试来自 DJ Native Swing 的 JWebBrowser:http://djproject.sourceforge.net/ns