Created On:  13 September 2012


How can I access a list of StarTeam Servers using the 12.5 SDK?


In java construct a serverInfoCollection object from the file (see below)

* Loads the server list from the specified file.
* this will throw an exception if there are any problems reading the file or if the file is not a properly formatted server list file.
* @param file
* the from which to load the server list.
* @throws IOException
public ServerInfoCollection( file) throws IOException {
and here's a simple usage example
public void testLogInToStarDraw() {
ServerInfoCollection srvrLst = null;
try {
srvrLst = new ServerInfoCollection(
} catch ( ex) {
ServerInfo[] srvrs = (ServerInfo[]) srvrLst.toArray(new ServerInfo[0]);
ServerInfo theServer = null;
for (int i = 0; i < srvrs.length; i ) {
if (srvrs(i).getHost().startsWith("stjavasrc1")) {
theServer = srvrs(i);

For further SDK guidance please visit StarTeam SDK Community