title: Configure a p2 update repository programmatically
body: <p>There is an article in the Eclipse wiki how to configure user's p2 default repositories of an RCP application by adding a static conf file to your product: </p>
  
  <p><a href="http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application#Configuring_the_user.27s_default_repositories" rel="nofollow noreferrer">Equinox/p2/Adding Self-Update to an RCP Application - Configuring the user's default repositories</a></p>
  
  <p>I want to do the same programmatically in a Java class when the user changes some configuration details. I could not find appropriate p2 API documentation for that.</p>