| description | Install the Proxyman Root CA certificate into all Java KeyStores on macOS with one script, so Proxyman can capture HTTPS traffic from Java and Kotlin apps. |
|---|
To intercept HTTPS traffic from Java apps, you need extra steps to install the Proxyman CA Certificate into the Java KeyStore. For example, to:
- Intercept traffic from unit tests (written in Java or Kotlin)
- Intercept traffic from a Java app or CLI
- Proxyman provides a script that automatically installs the Root Certificate into the Java KeyStore with 1 click ✅
- Supports
$JAVA_HOME - Supports
SDKMAN - Supports
/usr/libexec/java_home
Before installing the Proxyman CA on Java VMs, you have to install it properly on your Mac.
Check out the macOS guide:
{% content-ref url="macos.md" %} macos.md {% endcontent-ref %}
You can skip this step if you've already done it.
- Certificate Menu -> Install Certificate on Java VMs -> Run Script...
Run the Java certificate script
- The script tries to find the KeyStore location from JAVA_HOME, SDKMAN, or $(/usr/libexec/java_home) and installs the CA Certificate if possible
Proxyman installs the certificate into all Java trust stores it can find
{% hint style="info" %} You can find the script at /Applications/Proxyman.app/Contents/Frameworks/ProxymanCore.framework/Versions/A/Resources/install-certificates-java.sh {% endhint %}
{% hint style="info" %} The script might ask for Automation permission, because Proxyman uses AppleScript to run it in the Terminal app with admin permission. {% endhint %}
- If you get the following error, check out the solution from @yauheniprakapenka: ProxymanApp/Proxyman#569 (comment)
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

