My own take on the matter is that Jesus saw people who got rich out of a sense of obligation and who really didn't desire wealth. By telling them to sell their goods and donate the proceeds to the poor, he was freeing them from a false value system (i.e., propitiating Mammon as an obligation.)
It's funny that no-one's mentioned the Parable of the Talents so far. I guess that's because those who believe Jesus was a socialist interpret it in a different but not necessarily unBiblical way.
it wasnt the money— it was the love for money. jesus says that it is easier for a rich man to pass through an eye of a neddle than a rich man to enter the kindom of god— meaning= a rich man wont hummble himself and repent before god to be saved, because he thinks he dont need anything, cause money has secured him above everthing else
See post 63.