Only OpenJDK is open source. Other than that, Java is closed -- and to certify a Java implementation, you have to pay a license fee, which not the case for .NET.
IMO were it not for the Oracle acquisition, it would be a matter of time until Java were fully open sourced, but with Oracle in charge now I suspect that it's not going to happen.