JavaFX WebView Not Loading HTTPS Page

人盡茶涼 提交于 2019-12-22 12:23:24

问题


I have written a browser using the JavaFX WebView control. Everything is fine until I try to load an encrypted page. I try https://www.gmail.com and I get an "Unknown Error" in the exception property of the load worker. This only happens when I package the application as a stand-alone; when I run the project in NetBeans everything is fine. I am guessing it has to do with SSL certificates, but I tried pretty much everything I could think of, including importing each certificate in the trust store with "keytool," but nothing works.

Any ideas? Much appreciated. Thanks.


回答1:


Does your browser work with https sites when launching from an IDE (Eclipse, Netbean)? If so, the difference might be the JRE. You might need to copy the file sunjce_provider.jar to the bundled JRE. I use a Mac and sunjce_provider.jar is located in /Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Home/jre/lib/ext.



来源:https://stackoverflow.com/questions/13356633/javafx-webview-not-loading-https-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!