On'a essayer d'utiliser l'API jdic avec ce petit code:
mais ona eu cet erreur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.jdesktop.jdic.browser.WebBrowser; import java.net.*; public class navigateur { WebBrowser webBrowsere; public navigateur() { try { webBrowsere = new WebBrowser(new URL("<a href="http://www.sun.com/" target="_blank">http://www.sun.com/</a>")); } catch (MalformedURLException ex) { System.out.println(ex.toString()); } } public static void main(String[] argv) throws MalformedURLException { WebBrowser webBrowser1; webBrowser1 = new WebBrowser(new URL("<a href="http://www.sun.com/" target="_blank">http://www.sun.com/</a>")); navigateur nv = new navigateur(); } }
java.lang.UnsatisfiedLinkError: nativeGetBrowserPath
at org.jdesktop.jdic.browser.WebBrowser.nativeGetBrowserPath(Native Method)
at org.jdesktop.jdic.browser.WebBrowser.setBinaryName(Unknown Source)
at org.jdesktop.jdic.browser.WebBrowser.<init>(Unknown Source)
at essaitri.navigateur.main(navigateur.java:18)
Exception in thread "main"
Partager