[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Protocol handler not found : https

I have Java program running standalone in a Linux enviornment.  It is attempting to connect to an https URL using an instance of: java.net.URLconnection.

The program worked find as a Java servlet running under Tomcat on the same Linux box.  When I moved it to standalone the attempts to connect to the https URL fails : Protocol handler not found : https

My JDK version is : jdk1.5.0_05

My PATH variable is set to : /usr/java/jdk1.5.0_05/bin
My JAVA_HOME variable is set to : /usr/java/jdk1.5.0_05

0
RickFischer
Asked:
RickFischer
  • 2
2 Solutions
 
ahoffmannCommented:
why not simply using httpclient instead of java.net.URLconnection?
0
 
zgrpCommented:
Hello,

The problem is that java.net.URLconnection is used to connect with HTTP (Hyper Text Transport Protocol).

While to connect to HTTPS, wich use SSL (Securre Socket Layer), you should use javax.net.ssl.HttpsURLConnection, check:

http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/HttpsURLConnection.html

Hope this help,

Cheers
0
 
zgrpCommented:
Helped ?
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now