PRB: Allowing the URL class to Access HTTPS in Applications (191120)
The information in this article applies to:
- Microsoft SDK for Java 2.0
- Microsoft SDK for Java 2.01
- Microsoft SDK for Java 2.02
- Microsoft SDK for Java 3.0
- Microsoft SDK for Java 3.0 Preview 1
This article was previously published under Q191120 SYMPTOMS
Attempting to open a HTTPS: URL in an application with the default
URLStreamHandler will result in the following error message being
generated:
java.net.MalformedURLException: unknown protocol: https
at java/net/URL.<init> (URL.java)
CAUSE
The default URLStreamHandler for applications does not have the ability to
access a URL via the HTTPS: protocol.
RESOLUTION
The com.ms.net.wininet.WininetStreamHandlerFactory class can be used to
allow applications to access an HTTPS: URL. In an application, you can set
the URLStreamHandlerFactory using the following command:
java.net.URL.setURLStreamHandlerFactory(
new com.ms.net.wininet.WininetStreamHandlerFactory());
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 7/14/2004 |
---|
Keywords: | kbJava kbnetwork kbprb KB191120 |
---|
|