Ecclesiastes 2:18
Yea, I hated all my labour which I had taken under the sun: because I should leave it unto the man that shall be after me. Yea, I hated all my labour which I had taken under the sun: because I should leave it unto the man that shall be after me.
Solomon learned through his own bitter experience to hate life and all the labor and achievements he had taken under the sun for pleasure and greatness. His hatred grew as he pursued earthly work while seeking pleasure and greatness, only to find its outcome to be emptiness. In part he hated his labor because he saw he must leave it all to the man who should come after him. That prospect exposed earthly work and possessions as unable to give lasting satisfaction or profit when made life's highest good.
Earthly work, possessions, and pleasure, when set up as life's highest good, prove empty and cannot supply lasting joy, peace, or rest. They are vanity and vexation of spirit, leaving weariness, thirst, and despair, especially when prosperity turns the heart away from communion with God. Even worship of heathen gods with their altars proved vain and gave his soul no rest. Wearied and thirsting, he found no satisfaction in what earth could offer.
In his later years he turned from earth's broken cisterns to drink at the fountain of life. Under inspiration he recorded the history of his wasted years as a warning for after-generations. Although his people reaped harvests of evil from his sowing, his life work was not wholly lost, because the discipline of suffering at last accomplished its work in him.