Java has its own certificate storage. At least in Arch Linux it is located in:
To add a new certificate there, run this command:
keytool -keystore cacerts -importcert -alias myrootcert -file /path/to/MyRootCert.crt
(you might want to run that as root) As a password, the default is “changeit”.
I encountered this while setting up my Android project in IntelliJ IDEA, trying to do a Gradle build. Also the Android SDK tool was failing on an invalid SSL connection.