Java is a compiled language because the source code is converted into byte code. This byte code is not a machine code.
Java is an interpreted language because the byte code is interpreted by a virtual machine.
The virtual machine allows the java code to be run on any platform.
This route was chosen by the creators of java to allow the language to be machine independent.