Capture Java VM Traffic using Fiddler

2 minute read | By Toan Nguyen

Customer’s using the Azure SDK for Java may need to capture network traffic for the REST API requests to troubleshoot issues. Below are the steps to configure Fiddler and Eclipse to capture the API requests. Telerik provides documentation for configuring your Java app to send traffic to Fiddler available here, however, additional steps will be need to capture secure traffic which is provided in this article. Other development tools can be used but this article covers Eclipse and IntelliJ IDEA. To use other tools, use the VM arguments described in either the Eclipse or IntelliJ IDEA sections.  


  Networking Tracing-   Fiddler -  

Development Tools

  Eclipse - or IntelliJ IDEA Community -  

Configuring Fiddler

  By default, Fiddler is not configured to decode any encoded traffic. To enable this feature you can select an encoded request/response and select the “click to decode” message.  

TIP: Stop capturing of all traffic from Fiddler by pressing f12. All traffic sent from the Java App will still be captured in Fiddler when traffic is sent using the proxy settings. This makes it easier to troubleshoot the requests coming from the app.  


You will also need to perform the following.  

  1. Select the Tools menu.
  2. Choose Telerik Fiddler Options.
  3. Select the HTTPS tab and check the following

    a) Capture HTTPS CONNECTs

    b) Decrypt HTTPS Traffic


  4. We’ll need to export the certificate used by Fiddler to use with Eclipse later. Perform the following.

    a) Select the “Actions” button.

    b) Choose “Export Root Certificate to Desktop. Press the OK button.


  5. To create a keystore with this certificate, perform the following.

    a) Open the command line as administrator.

    b) echo %JAVA_HOME%

    c) Change directories to the variable provided (I.e. C:\Program Files\Java\jdk1.8.0_121 in my case).

    d) cd bin

    e) keytool.exe -import -file C:\Users\\\Desktop\\FiddlerRoot.cer -keystore FiddlerKeystore -alias Fiddler

    f) Enter a password and confirm the password.

    g) Trust this certificate? [no]: y

    h) Example screenshot below.


Configure Eclipse

  1. In Eclipse, select the Run menu and choose “Run Configurations”.


  2. Select your Project and choose the “Arguments” tab.

  3. Enter the following in the VM arguments section.  

  4. Press Apply and Run. eclipse-2  

Configuring IntelliJ IDEA

  1. Select the Run menu and choose “Edit Configurations”


  2. Select your Java Application on the left and enter the following “VM Options”.  

  3. Press OK, Apply, and Run the App.


Fiddler Capture Examples

  1. HTTP 401 response showing the JSON output for the authentication request from the Azure SDK for Java.


  2. HTTP 200 with JSON response for a REST API to the Azure Resource Management Service from the Azure SDK for Java