static String getArgVal(String[] args, String opt, boolean watchQuoting){
        if ((args == null) || (args.length==0) || (opt==null) || opt.isEmpty()){
            return null;
        }
        if (watchQuoting){
            List<String> args2 = ServerUtils.concatQuotes(Arrays.asList(args));
            args = args2.toArray(new String[0]);
        }
        try{
            String val = null;
            for(int i = 0; i<args.length; i++){
                if(args[i].equals("-" + opt)){
                    if (args[i+1].charAt(0)!='-'){
                        val = args[i+1];
                    }                    
                    break;
                }
            }
            return val;
        } catch (RuntimeException ex){
            return null;
        }
    }