Actually, I've seen more bleeding of development into the quick-and-dirty development frameworks like RoR and Django than .Net.
An awful lot of business servers are not Windows, they're Solaris, Linux or some other OS. You can run .Net on Linux using Mono, but I wouldn't bet my business on it.
What happens to Sun is immaterial. Unlike .Net, Java is independent enough of its owner that even if Sun went out of business this afternoon, Java would still be a viable platform.
A lot of Microsoft's success is in its SMB (Small/medium Business) market, where the low initial buy-in costs make it attractive. Since there a LOT of SMBs, Microsoft sells a lot of technology. However in really large businesses, there are places where Microsoft is less welcome. While security is Microsoft's most famous failing, they also are very bad about legacy software. IBM and Sun understand computers where a program, once written, may continue to run with little or no change for 30 years or more. Of course, anything that old isn't in either Java or .Net, it's probably in COBOL, but the point is that IBM and Sun understand that these are applications that can't afford to be subject to the whims of this week's
IDE or language specifications.
In Java, there's both compiler compatibility switches and the deprecation option. Both of these go a long way to ensuring that if a critical app needs emergency maintenance, the changes can be made and put into production ASAP. In contrast, I've had to do panic installs of ancient IDE's and even ancient versions of Windows to fix old Windows apps because 6 months after a software system was released, they replaced it with an incompatible one. Consider the revolving door of RDA, DAO, ADO,
etc. Or my own personal pet peeve, the
SOAP DLLs.
I'm very much against IDE dependencies, based on bad experiences, as I mentioned. My projects are all expected to be buildable in batch, regardless of what IDE I use for my editing. However don't confuse IDEs with libraries. The jakarta stuff is just an optional extension to the core classes that come with Java. It can all be used without any IDE fancier than Windows Notepad. If the only way you can interact with them is using some IDE's wizards, that simply means that you've let yourself become captive to your tools, and, repeating myself, that's why I'm not happy with IDE dependencies.
Truthfully, while Java's market share may be diminishing, it's Microsoft I'd worry about in the longer term. In the OS field, I think they pretty much peaked at XP. In the office field, they could have stopped at Office '97 and relatively few people would have cared. In the general programming area, there's nothing as definitive, but the days when each new product release contained crucial "must-have" features are pretty much over.
We have more hardware horsepower and software than most of us really need. As a result, it has freed us to be more selective about what we use, and selective isn't a good thing for proprietary solutions providers.