String mapName = "MapDemo";
if ( args.length > 0 && (!args[args.length-1].startsWith("-"))) {
mapName = args[args.length-1];
}
//start the channel
channel.start(Channel.DEFAULT);
//listen for shutdown
Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
//create a map demo object
new MapDemo(channel,mapName);