Your riches have rotted and your garments are moth-eaten.  Your gold and silver have corroded, and their corrosion will be evidence against you and will eat your flesh like fire. You have laid up treasure in the last days. (ESV)
This is not pleasant language. I have often said that if you think you are living a pretty good life, just read the book of James. He has a way of pointing out just how out of touch we are with the kind of life that God requires. In these verses he continues to rail against those who have chosen to follow the idols of earthly possessions instead of God.
James wrote these words roughly two thousand years ago. At that time it was far more difficult to keep things from rotting and decaying. In our sophistication and technology we could likely keep our riches from being destroyed in the same manner than the people in the first century who were the recipients of James' letter.
The reality is, the same attitude that plagued the people of James' day affects people of our day. It has been said that you never see a trailer being hauled behind a hearse. We cannot take one thing with us into eternity. James says that all of the corroded possessions that the rich were so in love with will be the evidence against them when it comes to their being judged before God.
What was their crime? They loved possessions rather than God. Because of their misplaced love they had a misplaced purpose in life. The true believer in Jesus Christ has a constant view of the return of Christ. We long for him each day. The rich have laid up treasure in the last days. The last days are the days before Christ's return. Their focus was on possessions, not the Prince of Peace.
Be careful that the love of money and material things does not trap you. Seek first the kingdom of God. Your treasure is not only in heaven. Your treasure is the Savior himself!