# Java VMs

In order to intercept HTTPS traffic from Java apps, it requires extra steps to install Proxyman CA Certificate into Java Key Store.

* Intercept Traffic from Unit Test (written by Java or Kotlin)
* Intercept Traffic from Java app or CLI

### 1. Install Proxyman CA on macOS machine

Before installing Proxyman CA on Java VMs, we have to install properly on your current mac machine.

Check out macOS Guideline:

{% content-ref url="/pages/-LlQ11LV9KVIfRygaCPn" %}
[macOS](/~/revisions/CTFzuwrlmsieJaiDVRDD/debug-devices/macos.md)
{% endcontent-ref %}

If you've done this step, you can skip and start the next step.

### 2. Install Proxyman CA to all Java Key Stores

* Certificate Menu -> Install Certificate on Java VMs

![](/files/7pmGiHRc7yk79H3cIOW3)

* The script will attempt to find the Key Store location from **JAVA\_HOME** environment and install the CA Certificate if possible

![](/files/-MENQX1vwFIYCATdY2T5)

{% 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 require permission for EventKit because Proxyman triggers the script by [Apple Script](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) in order to install under admin permission.
{% endhint %}

### Alternative solution

* Check out @[**yauheniprakapenka**](https://github.com/yauheniprakapenka) solution: <https://github.com/ProxymanApp/Proxyman/issues/569#issuecomment-723588490> if you get the following error&#x20;

`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`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.proxyman.com/~/revisions/CTFzuwrlmsieJaiDVRDD/debug-devices/java.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
