You are right that it was the point. It was simply a bad goal. Sun hoped it would allow people to migrate to their hardware, when instead it enabled them to migrate away, or to never have to choose.
I think it had little to do with that. Every year Sun had bigger and bigger computers like we needed bigger monolithic servers. Run an ISP and need 100,000 user telnet accounts? Bigger computer! Then, seemingly overnight, the problem is solved by buying a hundred blades instead, and paying nothing for except hardware.
Sun was riding high on the dotcom era where every new company ran out and bought an E10000, and maybe one with less specs for a development server. I've heard stories of these being shipped before payment just so they could declare the sales early -- once the bloodbath started, it Sun was left holding the bag.
BSD and Linux on commodity hardware killed everything at Sun and Java really had nothing to do with it.