This paper considers the Schwarz problem that consists in finding a J-analytic function by its real part on the boundary. The Fredholm solvability of this problem is proved. The integral representation of J-analytic functions by Cauchy-type integrals with real density is obtained.