Java is a platform independent language. But, JVM is machine dependent. So, my question is: Which parts of java are platform independent? JRE, JDK or JVM? Please Explain.
JVM , JRE , JDK these are all the backbone of java language. Each components work separately . JDK and JRE physically exists but JVM is an abstract machine that means it has not physically exists.

JVM
JVM (Java Virtual Machine) is a software. It is a specification that provides runtime environment in which java bytecode can be executed. It is not physically exists.
JVMs are not same for all hardware and software, for example for windows os JVM is different and for Linux JVM is different. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.
JRE
The Java Runtime Environment (JRE) is part of the Java Development Kit (JDK). It contains set of libraries and tools for developing java application. The Java Runtime Environment provides the minimum requirements for executing a Java application. It physically exists. It contains set of libraries + other files that JVM uses at runtime.

JDK
The Java Development Kit (JDK) is primary components. It physically exists. It is collection of programming tools and JRE, JVM.

All 3 are platform dependent.
The java code before and after compilation is platform independant. You can compile on windows and run the byte code on unix using Unix's jvm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With