Critical current density of superconducting-normal-superconducting Josephson junctions and polycrystalline superconductors in high magnetic fields