Change user agent in Eclipse 3.5 for new software installations

孤者浪人 提交于 2019-12-12 10:57:58

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/1526956/change-user-agent-in-eclipse-3-5-for-new-software-installations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!