Navigateur web ou browser web en Java
Bonjour à tous,
j'aimerais savoir s'il existe des API open source permettant de programmer en Java un navigateur web, navigateur assez simple (HTML).
L'objectif est d'intégrer cette API dans une application client lourd (Swing). On pourrait alors avoir dans un Panel une fenêtre web.
Est ce possible ?
Cordialement,
SimpleViewer ... c'est presque ça
Merci du code.
Toutefois j'ai l'erreur suivante, quand je lance avec l'adresse
Code:
"http://www.google.fr/"
:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
java.net.UnknownHostException: www.google.fr
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
at sun.net.www.http.HttpClient.New(HttpClient.java:299)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at javax.swing.JEditorPane.getStream(JEditorPane.java:689)
at javax.swing.JEditorPane.setPage(JEditorPane.java:406)
at javax.swing.JEditorPane.setPage(JEditorPane.java:790)
at javax.swing.JEditorPane.<init>(JEditorPane.java:251)
at com.aaam.SimpleViewer.<init>(SimpleViewer.java:38)
at com.aaam.SimpleViewer.<init>(SimpleViewer.java:21)
at com.aaam.SimpleViewer.main(SimpleViewer.java:77)
Exception in thread "main" java.lang.NullPointerException
at com.aaam.SimpleViewer.<init>(SimpleViewer.java:42)
at com.aaam.SimpleViewer.<init>(SimpleViewer.java:21)
at com.aaam.SimpleViewer.main(SimpleViewer.java:77) |
Bizarre : Google non reconnu ? Même punition pour yahoo, etc