The phase transition in liquid due to the excitation of zero-net-mass-flux jet is simulated using the lattice Boltzmann method. First, the scheme for inlet/outlet boundary of the specific zero-net-mass-flux jet is derived. Then, with the model proposed by Shan and Doolen for single component and multiphase flow, the process of a single bubble formation in a liquid-filled square cavity is simulated, with the excitation of zero-net-mass-flux jet taken into consideration. Further, the investigation of the effects of three significant parameters, ε/T, T and vout/vin, on phase transition in the square cavity is carried out. The results show that the number of vapor nodes increases rapidly in the early stage of phase transition, and then achieves a constant after a long term fluctuation. In some sense, the previously mentioned parameters except T reflect the rapid change of jet velocity when the stages of inflow and outflow are transformed into each other. Thus the evolution of phase transition in liquid can be affected by the parameters ε/T and vout/vin mainly, but by parameter T negligibly. When ε/T is small, the single bubble resulting from phase transition is separated from the boundary. On the contrary, when ε/T is large, the corresponding single bubble attaches to the bottom boundary, and the process of phase transition is accelerated. Moreover, with vout/vin increases, the domain filled by vapor phase in the square cavity, decreases slightly. In summary, this study reveals the details of phase transition process in liquid subjected to the zero-net-mass-flux jet.