It's a long-term strategy and Sun ran out of juice. The strategy doesn't work by itself; you do the kinds of things Sun was doing to keep the ecosystem active and healthy, and then you release and aggressively promote a commercial Java IDE and make a ton of cash, and build other products on top of the ecosystem that you sustain.
In my opinion Sun's downfall was a serious overestimation of SPARC's performance. They needed to move and get something else out there.
I am highly skeptical of this. I believe this was the stated strategy of many of Sun's decisions, and it did not work out well for them.