我写了一个多线程下载测试程序 照着教程做的 但运行提示错误
这个语句
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();提示错误 sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
其中rul 为 URL url = new URL(path);
path 为 String path = http://localhost:8080/MyWebTest/download.ppt;
请问该如何解决?我查找了一下 有说是JDK的版本问题?
java网络编程HttpsURLConnection
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-