Try this:
public class DrawMap {
public static void usage() {
System.err.println("Usage: DrawMap {mapfile} {outfile}");
System.exit(-1);
}
public static void main(String[] args) {
if (args.length != 2) usage();
System.out.println(args[0]);
mapObj map = new mapObj(args[0]);
imageObj img = map.draw();
System.out.println("The map will be drawn to:"+args[1]);
img.save(args[1], map);
}
}
