It's all about the answers!

Ask a question

RTC 6.0: How to get Proxyhost and ProxyPort from RTC Eclipse Client.


Naveen Tyagi (19778152) | asked Jan 27 '16, 4:22 a.m.
edited Jan 28 '16, 12:12 a.m.
Hi All,
I am able to get the Username,Password and URL from RTC Eclipse client : https://jazz.net/forum/questions/214936/rtc-60-how-to-get-log-in-user-password-in-rtc-eclipse-client

But i also need to get the proxy setting being used on the network . can anybody give some hint on this ?. Thanks in advance. :)

Accepted answer


permanent link
Donald Nong (14.5k614) | answered Feb 16 '16, 9:54 p.m.
This is a question related to Eclipse, not specific to RTC.

When you mention ProxyHost and ProxyPort, I assume that you are talking about the Java properties http.proxyHost and http.proxyPort. In this case, you can just use the System.getProperty() method to retrieve the values.

If you are referring to the Eclipse network connection configuration, that's another story. In this case, you can use the Platform.getPreferencesService() method to get the preference service and then access the preference tree.
https://wiki.eclipse.org/FAQ_How_do_I_use_the_preference_service%3F
http://help.eclipse.org/luna/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/preferences/IPreferencesService.html

Note that if the proxy requires authentication, the username and password are stored in the Equinox Secure Storage, and you need to appropriate API to access such information.

Naveen Tyagi selected this answer as the correct answer

Comments
Naveen Tyagi commented Feb 26 '16, 1:41 a.m.

Thanks Donald, Used Eclipse Proxy Services. Working like charm. :) :)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.