Attempting to download https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html using code :
Source.fromURL("https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html", "ISO-8859-1").mkString
throws exception :
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
From reading Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target the issue is caused by me using a self signed certificate.
If I download the file using command line tool like 'wget' :
wget https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html the
the page downloads successfully.
Is 'wget' using a certificate utilised and updated by the operating system ?
Why can I download using 'wget' but not using JDK ?