Blame me for that text -- but I say it's correct!
Your problem is the lack of a "protocol handler" for the "https"
URL scheme. As you noted, when you provide one, the URL class
supports it without modification ... exactly as written.
Yes, it's a problem that Sun's still not bundling SSL with the
JDK or plugin. Other products (not just HotJava) do bundle it.
I can't explain any business reasons why this still hasn't been
done, but I can assure you you're not the first person to want
to see it fixed. Some of them are in a better position to fix
the problem than either of us, and I'm told a fix is on the way.
- Dave
Fred Romelfanger wrote:
>
> I was looking at the early access ssl API Users guide and found the
> following:
>
> --------
>
> HTTPS URL Handler
>
> The java.net.URL class supports, without any modification, the
> https://host/object style URL. This represents one of the most common
> APIs to SSL
> on the client side; it layers the HTTP protocol over SSL. In many
> environments, firewalls support tunneling of HTTPS through corporate
> firewalls to
> Internet web servers such as those for banks and brokerages, providing a
> richer programming model than that which is available to socket level
> programmers.
>
> A common way to use such URLs is to use HTTP's POST method to send a
> request to a remote object, for which a response is returned. This can be
> viewed as an easily used "object oriented RPC", secured using SSL's
> privacy and authentication features.
>
> ----
>
> java.net.URL does not support the https protocol without modification.
>
> Netscape, IE, and HotJava do provide an https protocol handler, but
> the jdk and java plugin do not. If you try to use https with with
> jdk or the java plugin, you get the error message:
>
> java.net.MalformedURLException: unknown protocol: https
>
> It would be nice if this did work in all java implementations.
>
> I have successfully used the files supplied with HotJava to make an
> https connection via the JDK, but requires a native shared library, and
> would complicate distribution for the java plugin. If the problem is
> export concerns with the jdk and java plugin, it would be nice if Sun
> would supply an https handler with either an implementation of the SSL
> API or JCE that could be used by the JDK or java plugin and could be
> download seperately.