Article ID: 191120 - Last Review: July 14, 2004 - Revision: 2.1 PRB: Allowing the URL class to Access HTTPS in ApplicationsThis article was previously published under Q191120 On This PageSYMPTOMS
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:
STATUS
This behavior is by design.
MORE INFORMATION
The following Sample code demonstrates how to use the
WininetStreamHandlerFactory in a Java application. You should change the
line 'String page="..."' to point to a valid HTTPS Web server.
Sample Code | Article Translations
|

Back to the top
