public static void main(String[] args) {
    	
    	int port = DropboxConstants.FILE_SERVER_PORT;
    	boolean debug = false;
    	boolean useUI = false;	
    	String disk = DropboxConstants.FILE_SERVER_ROOT;
    	int id = 0;
    	int prio = 1;
    	int maxClientNum = DropboxConstants.MAX_CLIENTS_IN_FS;
    	
    	if(args.length < 2){
    		usage();
    		System.exit(1);
    	}
    	
    	for( int i = 0; i < args.length; i++ ){
    		
    		if(args[i].equals("-d"))
				debug = true;
			else if(args[i].equals("-u"))
				useUI = true;
			else if(args[i].equals("-p")){
				i++;
				port = Integer.parseInt(args[i]);
			}
			else if(args[i].equals("-disk")){
				i++;
				disk = args[i];
			}else if(args[i].equals("-id")){
				i++;
				id = Integer.parseInt(args[i]);
			}else if(args[i].equals("-prio")){
				i++;
				prio = Integer.parseInt(args[i]);
				prio = Math.max(prio, DropboxConstants.MIN_PRIO);
				prio = Math.min(prio, DropboxConstants.MAX_PRIO);
			}
			else if(args[i].equals("-mc")){
				i++;
				maxClientNum = Integer.parseInt(args[i]);
				maxClientNum = Math.max(maxClientNum, 0);
				maxClientNum = Math.min(maxClientNum, DropboxConstants.MAX_CLIENTS_IN_FS);
			}
    	}
    	
    	DropboxFileServer server = new DropboxFileServer(id, prio, maxClientNum, port,debug,useUI,disk);
    	server.run();
    }