John Gill's Exposition of the Whole Bible
Ecclesiastes 7:22
For oftentimes also thine own heart knoweth,.... Or "thy conscience", as the Vulgate Latin version, which is as a thousand witnesses; which, if a man attends to, he will be convinced of his own faults, failings, and infirmities, he is frequently in the commission of. Particularly,
that thou thyself likewise hast cursed others; either in heart, or with the tongue; thought ill of them, wished ill to them; spoke contemptibly of them, reviled and reproached them; called them by bad names, and abused them; and said some very hard and severe words concerning them, in a passionate fit, being provoked; and afterwards repented of it, being better informed of the state of the case, or being convinced of the evil of passion and rash speaking; and therefore such should consider the like passions and infirmities of others, and pass over them, and forgive them: so Alshech,
"if thou hast cursed others, and dost desire men should forgive thee, so do thou also forgive;''
see Matthew 6:14. The word "oftentimes", in the first clause, is to be connected, not with the word "knoweth", as if a man often knew this, but with the word "cursed"; suggesting, that a man may be often guilty of this himself, and therefore should be more sparing of his censures of others; see Matthew 7:1.