The problem of fluxon generation in Josephson junctions by a current pulse is addressed, with the help of the inverse scattering transform theory. The threshold conditions for soliton (breather or fluxon) generation are obtained analytically, with respect to relevant studies in the same direction. The reliability of the theory is examined by direct numerical experiments. Fairly good agreements exist between the theory and the numerical results, particularly in the case of semi-infinitely long junctions. Practically long (L~10λ) Josephson junctions are also explored, namely, overlap, in-line and circularly-symmetric annular junctions. Explained are those factors that complicate the generation processes suck as boundary effects, stability of soliton states against the driving current, soliton return effect and the applied magnetic field (in annular junctions only). The current pulse method is shown to be effective and practical for fluxon generation in Josephson junctions.