Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

HTTPS protocol Unknown error

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Carl,
Thanks a bunch. I will try it.
Chitra
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic