We study an interesting state with a self-generated magnetic flux in a
long Josephson junction. The critical current density j(c) is assumed
to alternate randomly along the tunnel contact on a length scale much
less than the local Josephson penetration depth. The phase difference
is then a sum of an alternating term and a smooth term which self-con
sistently contribute to the formation of a stationary stale with self-
generated flux. Two types of Josephson vortices are found in this stat
e, one with magnetic flux Phi(1)<Phi(0)/2 and another one with magneti
c flux Phi(2) = Phi(0) - Phi(1) > Phi(0)/2.