Solomon, arguably the wisest person who ever lived, missed a big idea.
Solomon tried everything to find joy, to find meaning - or did he? Was there something he missed? Something he didn't try that could have changed his opinion that everything was meaningless?
Yes! He missed something BIG.
He tried building stuff.
He tried being rich.
He tried laughing.
He tried wine.
He tried sex.
He tried wisdom.
He tried everything under the sun.
Except, he missed something big. He didn't try loving his neighbor as himself.
What if Solomon thought about his neighbor while he built stuff? Could his wealth have meant more if he used it for the benefit of others or spent it so that others could have better lives? What if the wine he drank had some love for the workers in it as an ingredient? What if his laughter was full of the joy gained by the knowledge that his efforts resulted in others being better off? What if he took better care of the shepherds who took care of the flocks he owned?
It seems that Jesus found a lot of meaning and joy in His expression of love for us:
"looking to Jesus, the founder and perfecter of our faith, who for the joy that was set before him endured the cross, despising the shame, and is seated at the right hand of the throne of God."
-Hebrews 12:2 ESV
Solomon's efforts resulted in what he found to be meaningless:
"I said in my heart, 'Come now, I will test you with pleasure; enjoy yourself.' But behold, this also was vanity. I said of laughter, 'It is mad', and of pleasure, 'What use is it?'
I searched with my heart how to cheer my body with wine - my heart still guiding me with wisdom - and how to lay hold on folly, till I might see what was good for the children of man to do under heaven during the few days of their life.
I made great works. I built houses and planted vineyards for myself. I made myself gardens and parks, and planted in them all kinds of fruit trees. I made myself pools from which to water the forest of growing trees. I bought male and female slaves, and had slaves who were born in my house. I had also great possessions of herds and flocks, more than any who had been before me in Jerusalem. I also gathered for myself silver and gold and the treasure of kings and provinces. I got singers, both men and women, and many concubines, the delight of the sons of man. So I became great and surpassed all who were before me in Jerusalem.
Also my wisdom remained with me. And whatever my eyes desired I did not keep from them. I kept my heart from no pleasure, for my heart found pleasure in all my toil, and this was my reward for all my toil. Then I considered all that my hands had done and toil I had expended in doing it, and behold, all was vanity and a striving after wind, and there was nothing to be gained under the sun."
-Ecclesiastes 2:1-11 ESV
Solomon couldn't find joy, couldn't find meaning perhaps because he acted with himself as the sole benefactor. Christ found joy, he knew that others were going to benefit by his actions.