Molecular dynamics simulations of nucleation of Lennard-Jones vapor confined in a slit pore have been performed. The walls of the slit pore are structureless walls; each wall interacts with vapor molecules via Lennard-Jones 9-3 potential. The rate of nucleation in the steady state is determined by analyzing time evolution of the cluster size distribution. At the same vapor density and temperature, the nucleation rate in the slit pore is higher than in the homogeneous vapor ͓K. Yasuoka and M. Matsumoto, J. Chem. Phys. 109, 8451 ͑1998͔͒, irrespective of the strength of attraction between the wall and vapor molecules. However, this attraction strongly affects the process of nucleus formation: if the attraction is weak ͑a drying wall͒, nuclei tend to form in the middle of the pore, whereas if the attraction is strong ͑a wetting wall͒, the nucleus formation originates from two sources, the surface diffusion of adsorbed molecules and deposition of clusters formed in the middle of the pore.