Earlier quoted context omitted.
Why must you do that? And why you don't have to do that for environments of modern llanguags?
tl;dr: Other environments are insecure out of the box, and require applications specifically opt-in to security. Java requires you opt-out of the security. HTTPS is built on top of PKI, which involves a list of trusted root authorities who verify that the certificate for blahblah.com is actually for blahblah.com. A self-signed certificate won't have that, and any application that doesn't validate that the certificate…
Besides ... why can't java just pull the certs out of the system (like you did manually) or ship with them like every browser does (I presume).