Most of Oracle's moves are short term plays. Growing the Java and Unix industries would allow them to sell boxes. These do the opposite, in favor of making cash now.
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.