In this present paper the stochastic finite element method (SFEM) is led into the field of fracture mechanics and the cracked structures, with random material properties and/or geometric parameters are analyzed by the stochastic finite element method. The calculating formulae for the mean and variance values of the J-integral are discussed leading to an effective method for the probabilistic safety assessment of cracked structures. Meanwhile some elastic problems are solved by this method and the numerical examples demonstrate that this method is appropriate for solving engineering problems and the related computer program developed in this paper has sufficient precision.