Sun IS Java. They're the power behind J2EE, the JDK, the whole JRE. If they go, who maintains that stuff, not to mention enhancing it for the future?
There's been talk about Open-Sourcing Java by Sun.
If they go under, which seems unlikely, Java will just be sold off to a wealthy company to compensate investors. Could be some burdensome shake-ups in restructuring, but the language department won't go extinct for some time.
Whoever buys it from Sun's shareholders. What do you think Microsoft (or IBM, or HP, or Hitachi, or Nokia, or...) would be willing to pay to steer Java (and its huge programming community) in exactly the direction they want it to go?
Prediction: if Sun really gets into trouble, it will avoid bankruptcy by selling off its Java division.
Sun is in the process of open sourcing Java. Eventually, it will be an open project, which should ensure its survival.