
Sdkman and installing Charles root certificates
Published on October 16, 2024
If you use Sdkman to manage your Java versions, you will need to run to the Charles root certificate install script for each Java version you use
Default Java version
Install Charles cert in default Java VM
- To install the Charles root cert in your default JVM, go to Help -> SSL Proxying -> Install Charles Root Certificate in Java VMs
- The Terminal will open. Follow the install instructions

Identify your default Java version
- If you want to identify what you default Java version is, run the below command
- java -version

Additional Java versions
Sdkman and Charles
- When you install the Charles root cert via the Help section, it will only be installed for 1 version of Java on your machine i.e. the default one
- To get Charles to work with multiple Sdkman-managed-JVMs, you will need to run the install script for each Java version

Select specific Java version
- Open the Terminal and use Sdkman to select the correct Java version (the attached screenshot uses Java 11 as an example)
- Then enter the following command to install the Charles root cert in that JVM:
- /Applications/Charles.app/Contents/Resources/add-to-java-cacerts.command
- Follow the install instructions
- Repeat the above steps for each additional Java version you are using
