Just a question of curiosity that I came up with when I was reading the JVM introduction.
Why do we need the Java compiler when we have the universal, platform-independent Java Virtual Machine? I mean, consider Python, which has an interactive shell that reads the source code line by line and then execute it without having to compile the source code beforehand, why can't JVM be designed to be able to read .java files directly like that of Python and then execute it?
If that's not the case, can someone please explain the significance of Java compiler?