Java can't find cacerts

Run the following commands:

sudo dpkg --purge --force-depends ca-certificates-java

sudo apt-get install ca-certificates-java

Worked for me.


I had the exact same issue, I linked the old ca certificates from java8 to new openjdk11. Go to the directory -

cd $(/usr/libexec/java_home -v 11)/lib/security
sudo ln -fsh /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/security/cacerts 

What I see is, people install the older version of java, link the cacerts.