JAVA ca-certificates error

I try to install some things but i keep getting this error:

Error occured during initialization of VM
Could not reserve enough space for object heap
Could not create the JAVA virtual machine.
dpkg: error processing ca-certificates-java (--configure):
 subprocess installed post-installation script returned error exit status 1.
Errors were encountered while processing:
 ca-certificate-java
E: Sub-process /usr/bin/dpkg returned an error code (1)

What should i do?


execute

dpkg --force-depends --configure ca-certificates-java

and solve other error appearing


You need to first remove ca-certificates-java. After removing it you may need to reinstall your java.

Remove it completely using

sudo apt-get purge ca-certificates-java

After it execute

sudo apt-get install -f