在Eclipse 3.5中更改用户代理以进行新的软件安装

在Eclipse 3.5中更改用户代理以进行新的软件安装

问题描述:

如何在Eclipse 3.5中更改用户代理?我尝试向eclipse.ini文件添加属性 -Dhttp.agent =我的用户代理,但使用WireShark我可以看到用户代理仍然是 Jakarta Commons-HttpClient / 3.1 。我需要更改这个,以便我可以通过公司的过滤器来下载插件和更新。这是我的eclipse.ini文件:

How can the user-agent be changed in Eclipse 3.5? I tried adding the property -Dhttp.agent=my user agent to the eclipse.ini file, but using WireShark I can see that the user agent is still Jakarta Commons-HttpClient/3.1. I need to change this so that I can get through the company's filter to download plug-ins and updates. Here is my eclipse.ini file:

-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:/Progra~1/Java/jdk1.6.0_14/jre/bin/javaw.exe
-vmargs
-Xms1024m
-Xmx1024m
-Dhttp.agent=my agent
-Djava.net.preferIPv4Stack=true
-Dosgi.requiredJavaVersion=1.5


如果Eclipse不覆盖配置,Apache的HttpClient库将使用httpclient.useragent系统属性而不是http.agent。

If Eclipse is not overriding the configuration, Apache's HttpClient library will use the httpclient.useragent system property instead of http.agent.