官方版

Configure a Java Application to Use Fiddler

To configure a Java application to send web traffic to Fiddler, set the proxy using jre:

  1. jre -DproxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888

Or:

  1. jre -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 MyApp

Or, change the Java Virtual Machine’s proxy settings programmatically:

  1. System.setProperty("http.proxyHost", "127.0.0.1");
  2. System.setProperty("https.proxyHost", "127.0.0.1");
  3. System.setProperty("http.proxyPort", "8888");
  4. System.setProperty("https.proxyPort", "8888");

谷歌翻译版

配置一个Java应用程序以使用Fiddler

要配置Java应用程序以将网络流量发送到Fiddler,请使用jre设置代理:

  1. jre -DproxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888

或者:

  1. jre -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 MyApp

或者,以编程方式更改Java虚拟机的代理设置:

  1. System.setProperty("http.proxyHost", "127.0.0.1");
  2. System.setProperty("https.proxyHost", "127.0.0.1");
  3. System.setProperty("http.proxyPort", "8888");
  4. System.setProperty("https.proxyPort", "8888");