Here you can find the source of parseArgs(String argvStart, String[] args)
public static Map<String, String> parseArgs(String argvStart, String[] args)
//package com.java2s; import java.util.HashMap; import java.util.Map; public class Main { public static Map<String, String> parseArgs(String argvStart, String[] args) { Map<String, String> rs = new HashMap<String, String>(); for (int i = 0; i < args.length; i++) { String arg = args[i]; String v = ((i < args.length - 1) && !args[i + 1].startsWith(argvStart)) ? args[++i] : null; arg = arg.substring(argvStart.length()); rs.put(arg, v);/*from ww w. ja v a 2 s . c o m*/ } return rs; } }