  In this work we investigate the $J/\psi$ production in proton-proton
collisions at the center-of-mass energy ($\sqrt{s}$) equal to 2.76, 5.02, 7, 8
and 13 TeV with a parton and hadron cascade model PACIAE 2.2a. It is based on
PYTHIA but extended considering the partonic and hadronic rescatterings before
and after hadronization, respectively. In the PYTHIA sector the $J/\psi$
production quantum chromodynamics processes are selected specially and a bias
factor is proposed correspondingly. The calculated total cross sections, the
differential cross sections as a function of the transverse momentum and the
rapidity of $J/\psi$ in the forward rapidity region reproduce the corresponding
experimental measurements reasonably well. In the mid-rapidity region, the
double differential cross sections at $\sqrt{s}=$ 5.02, 7 and 13 TeV are also
in a good agreement with the experimental data. Moreover, we interpolate the
double differential cross section as well as the total cross section of
$J/\psi$ in the mid-rapidity region at $\sqrt{s}=$ 8 TeV, which could be
validated if the experimental data is available.
