This answer applies to software that you will be installing in a customer's environment (not hosted SaaS).
We are a Java shop that sells to large corporate clients (Fortune 500s). Most of those companies can support both Java and Microsoft, although most prefer Microsoft. In the past few years, I've seen more and more of my clients de-commissioning Java applications and replacing them with .Net applications. The reason is that they believe Microsoft applications are easier to support (not always true, but that's their perception), and also because it's much easier for them to find developers that know Microsoft than it is to find Java developers. So when they need to customize the software, they want to be able to use Microsoft technologies.
I also sell to mid-market companies (those between $50 MM and $1 Billion in revenue), and most of them are Microsoft shops with much less sophisticated IT departments than the Fortune 500 companies. So while the largest companies can support pretty much any technology, the smaller ones wouldn't know how to support Java if their lives depended on it.
My experience is that companies who favor Java DO NOT assume all Java applications are open source. In fact, most enterprise software written in Java is NOT open source at all. A lot of Java development tools (Eclipse, Tomcat, JBoss, Spring, Hibernate, etc.) are open source, but the Java-based software that companies install is typically commercial software.
eCommerce applications are one place where Java may beat out Microsoft, since many of the best eCommerce tools are Java based (ATG, Endeca, etc.).