views:

242

answers:

1

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  A: 

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

jarnbjo