We report a computer-simulation study of the free-energy barrier for the nucleation of pores in the bilayer membrane under constant stretching lateral pressure. We find that incipient pores are hydrophobic but as the lateral size of the pore nucleus becomes comparable with the molecular length, the pore becomes hydrophilic. In agreement with previous investigations, we find that the dynamical process of growth and closure of hydrophilic pores is controlled by the competition between the surface tension of the membrane and the line tension associated with the rim of the pore. We estimate the line tension of a hydrophilic pore from the shape of the computed free-energy barriers. The line tension thus computed is in a good agreement with available experimental data. We also estimate the line tension of hydrophobic pores at both macroscopic and microscopic levels. The comparison of line tensions at these two different levels indicates that the "microscopic" line tension should be carefully distinguished from the "macroscopic" effiective line tension used in the theoretical analysis of pore nucleation. The overall shape of the free-energy barrier for pore nucleation shows no indication for the existence of a metastable intermediate during pore nucleation.