I was going through the internal work of Java(JVM) and I need some clarity on this part. Can somebody help?
I expect elements of the .class file explained and it's working.
.class file is byte code to be interpreted by a Java Virtual Machine, which will „map“ it to instructions specific for the underlying operating system (OS) and CPU. Therefore, Java byte code (.class) will run on any operating system and CPU providing a JVM. That includes (but is not limited to) Windows, MacOS and Linux.
.exe file are specific to a single target OS and CPU, usually Windows.