The formalism of path integral is used to treat the influence of Stark shift on the atomic population inversion (API) and Pancharatnam phase in the Jaynes–Cummings model with a nonlinear Kerr cavity. The propagators are given explicitly as perturbation series. In the case of a quantized wave interacting with a two-level system, these are summed up exactly, and the corresponding Pancharatnam phase as well as atomic population inversion, and energy spectrum with corresponding wave functions are deduced.