The Java language is open-source in the sense that anyone can create their own compiler to run Java code. Most people use a particular implementation of the language, however. The most popular ones are open-source. OpenJDK, for example, is open-source with a linking exception. And both Oracle’s HotSpot and GNU Compiler for Java licensed under the GNU GPL.