• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTPS protocol Unknown error

 
Chitra Sundaram
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when I try to create a URLConnection object with a https:// protocol, it gives me an "unknown protocol: https" error. How can I connect to such URLs?
Thanks
Chitra
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
First you need to get JSSE1.0.2 from the Sun site, install it and add the jar to your classpath.
Next add the code

before you create the URLConnection and it should work fine.
Hope this helps


[This message has been edited by Carl Trusiak (edited December 01, 2000).]
 
Chitra Sundaram
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carl,
Thanks a bunch. I will try it.
Chitra
 
Scott Appleton
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have installed JSSE (following the instructions as carefully as I could, since network security is somewhat Greek to me) and included Carl's code in my class. The second line (Security.addProvider()) generates the following error:
NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
The jar files are installed in <home>/lib/security, which is in my Classpath. The java.security.security file has been updated as the instructions direct. I don't know what else to do to make my program "see" the JSSE jar files. Any suggestions?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!