I often read Ecclesiastes because I enjoy its philosophy. I found this passage interesting because of the line in it that states that God has "set eternity in their hearts." It reminds me of a saying of St. Augustine, "The heart is restless until it rests in Thee."
There is something within us that knows that there is something more; something we keep striving for, something beyond our reach. People try to satisfy this yearning with all sorts of different things.
Some turn to shopping, or trying different relationships that don't seem to satisfy. Some use sex, others alcohol or drugs. Others use food, thinking that it will fill the void.
But until we find God, we still have that empty feeling within us.
The interesting thing is that once we have God in our lives, and trust in his love for us, we stop trying to fill up that empty spot in our hearts.
We are then free to engage in healthy relationships with people who value the same things we do. We can recognize habits that cause us pain rather than joy, and can give them up.
God placed eternity in our hearts so that we would search for him until we found him. Once we find him, everything falls into place in our lives.
It's not that we won't have problems or suffer, but it does mean that we're not alone. Whatever life brings us, we can get through it because this eternity within us gives us confidence in his promise of eternal life.

