I think since Java object oriented language, and you are not limited only to one architecture in java, lots of 3'rd party tools and open source components are available for it, lots of them component based, it is much more easier to develop and maintain large scale applications in Java while it is not the same in PHP (and LAMP)
now with component based web frameworks like JSF and JavaFX, frameworks like Seam, EJB 3 component model, tools like Netbeans (with webpack) and JDeveloper, and the new introduced GPL license for Java, I think developing small applications on PHP is not much easier than developing Java applications.
also the learning curve can be shorten a lot using good tools.
so an open source Java Stack on Linux can not be treated by PHP in any way any more.
but as some people love Microsoft platform, there are some people who love PHP and will still use it.
.NET and C# will never be available on platforms other than windows seriously, I tried Mono port of .Net to linux and found out lots of packages specially those related enterprise development (COM+, DCOM) are missing those components are based windows core API and if some one wants to port them he needs to rewrite lots of windows functionality.
the other side is that except an experimental port of .net compiler to BSD rest of the works done are not official work of Microsoft and are not update with latest MS .net platform.
so .Net and C# are not also a threating technology for Java yet! also Microsoft is big company with lots of talented people and they have 40% of server side market and if they decide to go for the rest, they can do lots of great things.