  We investigate the endomorphism monoids of certain finite $p$-groups of order
$p^8$ first studied by Jonah and Konvisser in 1975 as examples for finite
$p$-groups with abelian automorphism group, and we show some necessary
conditions for a finite $p$-group to have commutative endomorphism monoid. As a
by-product, apart from formulas for the number of conjugacy classes of
endomorphisms of said groups, we will be able to derive the following: There
exist nonabelian groups with commutative endomorphism monoid, and having
commutative endomorphism monoid is a group property strictly stronger than
having abelian automorphism group. Furthermore, using a result of Curran, this
will enable us to give, for all primes $p$, examples of finite $p$-groups which
are direct products and have abelian automorphism group.
