Java is open source by the completely literal meaning of this word, but it is not in the spirit of open source, i.e. it is not free software (as was recently demonstrated by Oracle's lawsuit).
[0]: https://en.wikipedia.org/wiki/Java_(software_platform)#Free_...