Add charles ssl proxy certificates to JDK on a mac

First you need to run charles and enable SSL proxying. The see which JDK is used by your application and add the certificate to the cacerts file: