Vector vt = new Vector();
String[] domains = null;
try
{
DomainRegistry domainRegistry = DomainRegistry.newInstance();
Iterator it = domainRegistry.iterator();
while (it.hasNext())
{
DomainEntry entry = (DomainEntry)it.next();
vt.addElement(entry.getRoot().getPath());
}
domains = new String[vt.size()];
domains = (String[])vt.toArray(domains);
}
catch (DomainRegistryException e)
{
System.err.println("ExtractDomainRoots: Exception caught, while parsing the domain registry");
e.printStackTrace();
}
return domains;