Supercurrent density distribution in Josephson junctions