Ecclesiastes 8:14

14 There is a vanity that hath been done upon the earth, that there are righteous ones unto whom it is coming according to the work of the wicked, and there are wicked ones unto whom it is coming according to the work of the righteous. I have said that this also [is] vanity.

Ecclesiastes 8:14 Meaning and Commentary

Ecclesiastes 8:14

There is a vanity which is done upon the earth
Transacted in this lower world under the sun, through the permission and direction of divine Providence; not that it is a vanity on the part of God, who has wise ends to answer by it, for the good of his people, the trial of their graces or to bring sinners to repentance, or harden them in sin; but this shows the vanity and uncertainty of all worldly things, and that there is no happiness to be had in them; that there be just [men], unto whom it happeneth according to the work
of the wicked:
to whom evil comes, as the Targum and Jarchi; who are treated as if they were wicked men, and dealt with in providence as sinners would be, if they had the just desert of their wicked works; being attended with poverty, sickness, and disgrace, and other calamities of life, as Job, Asaph, Lazarus, and others, and yet truly righteous and good men; again, there be wicked [men] to whom it happeneth according to the
work of the righteous;
to whom good things come, as the Targum and Jarchi; who have an affluence of good things, all the outward blessings of life, as health, wealth, honour, long life as if they had lived the best of lives, and were the most righteous persons upon earth; see ( Job 21:7-13 ) ( Psalms 73:4 Psalms 73:5 Psalms 73:7 ) ( Luke 16:19 ) ; I said, that this also [is] vanity;
this is said, as some think, according to the judgment of corrupt nature; or as it is apprehended by such who do not rightly consider the judgments of God and the wisdom of Providence in the ordering of things to answer good purposes; or rather the sense is, this is one of the miseries and infelicities of this life, and which demonstrates the emptiness of all things here below, and that the chief good and supreme happiness is not to be had here; but there is and must be a future state, when all things will be set right, and everyone will have and enjoy his proper portion.

Ecclesiastes 8:14 In-Context

12 Though a sinner is doing evil a hundred [times], and prolonging [himself] for it, surely also I know that there is good to those fearing God, who fear before Him.
13 And good is not to the wicked, and he doth not prolong days as a shadow, because he is not fearing before God.
14 There is a vanity that hath been done upon the earth, that there are righteous ones unto whom it is coming according to the work of the wicked, and there are wicked ones unto whom it is coming according to the work of the righteous. I have said that this also [is] vanity.
15 And I have praised mirth because there is no good to man under the sun except to eat and to drink, and to rejoice, and it remaineth with him of his labour the days of his life that God hath given to him under the sun.
16 When I gave my heart to know wisdom and to see the business that hath been done on the earth, (for there is also a spectator in whose eyes sleep is not by day and by night),
Young's Literal Translation is in the public domain.