Java is an object-oriented programming language developed by Sun Microsystems. Java source code files are compiled into bytecode which can then be executed by a Java interpreter (a Java Virtual Machines or JVM). So long as there is a JVM written for it, Java bytecode can be executed on any platform.
Sun's Java implementation is not Free Software but there is Jikes which is an OSI Certified bytecode compiler and Kaffe a GPLed Java runtime environment (JVM and base libraries) and there are many other projects, like GCJ. More Free Java(-related) applications.