import CTL.*;
import CTL.Types.*;

public class Add extends ToolBase
{
	public static void main (String[] args)
	{
		loadClasses(findClasses("Impl"));

		try
		{
			boolean dmn = true;
			int port = 0;
			
			if (args.length > 2)
			{
				port = RUtil.tryInt(args[0]);
				dmn = (port != -1);
			}

			Group grp = null;

			if (!dmn)
				grp = new Group(args);
			else
				grp = new Group("localhost", port, 0, 2, 
					Location.TCP, null);
				
			grp.run();
		}
		catch (Exception e)
		{
			e.printStackTrace();
			//RUtil.except(e);
		}
	}
}
