int equalsPosition = -1;
for (int i = 0; i < args.length; i++) {
String arg = args[i];
equalsPosition = arg.indexOf("=");
if ( equalsPosition == -1 ) {
System.err.println("The argument you specified, '"
+ arg + "' doesn't contain an '='.\n"
+ "All arguments must be of the form 'foo=bar'.");
System.exit(1);
}
put(arg.substring(0, equalsPosition),
arg.substring(equalsPosition + 1));
}