Problem:
Resolution:
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(java.io.File file) throws IOException {
and here's a simple usage example
public void testLogInToStarDraw() {
ServerInfoCollection srvrLst = null;
try {
srvrLst = new ServerInfoCollection(
com.starteam.ServerInfoCollection.getDefaultFile());
} catch (java.io.IOException ex) {
skipThisTest(ex.getMessage());
return;
}
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);
break;
}
}
...
For further SDK guidance please visit StarTeam SDK Community