First, you would have to precisely define the term "platform independent." Then, given that definition, your question could be answered. But just asking whether something is "platform independent" without explaining what that means to you just starts an argument between people who don't realize that there are different ways to define this term.
So if you want a sensible answer, you have to refine your question further.
Java Compiler and JVM are independent of each other, Java Compiler and JVM both are platform dependent.
Java Compiler - this is used to convert java program in the form of "Byte Code" that is nothing but class file and this compiler is coming different for different platform (windows, linux etc) so this is plateform dependent.
JVM - Use to run "Byte Code", this byte code is common for all the plateform, because all the compiler converts java code into the byte code that is common for all, and JVM can understand only byte code and can run this byte code on any platform, but again you required compitable JVM for that plateform.
Result - both Java Compiler and JVM are platform dependent but Java Applications are platform independent, because you can take byte code(.class file) to any other platform and can run using JVM.