bucksqosa.blogg.se

Linux vs unix vs windows vs mac
Linux vs unix vs windows vs mac




The use of a JIT compiler means that Java applications, after a short delay during loading and once they have "warmed up" by being all or mostly JIT-compiled, tend to run about as fast as native programs. The use of bytecode as an intermediate language permits Java programs to run on any platform that has a virtual machine available. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution. There is a JIT compiler within the Java Virtual Machine, or JVM. This bytecode is the same no matter what hardware or operating system the program is running under. The heart of the Java platform is the concept of a "virtual machine" that executes Java bytecode programs. Very good explanation at Java Virtual Machine. class file will be different across operating systems. system specific code - which can be obtained by javap utility) for same. java file would be same across operating systems.ģ) Disassembled bytecode (i.e. This is because bytecode (i.e.class file) for same. That is why Oracle gives options like 'JDK for Windows', 'JDK for Linux' while downloading.Ģ) A Java code compiled on one OS will run on other OS. Further, as mentioned in point 1, actual file will also be different on different OS.ġ) Java compiler/JRE installed on one OS will not work on other OS. Now, since system specific code, as the name suggests is dependent on OS, clearly, from algorithmic point of view, JVM is different across OS. exe, on Linux, it would be Linux executable etc.Ģ) Level 2 : JVM converts bytecode (i.e.class file) to 'system specific' code. But, since it is an executable file, the file itself will be different i.e. compiled class file of a java file will be same - no matter if the java file was compiled on Windows/Linux/Mac etc.), from algorithmic perspective, yes, compiler is same across the platforms. class file? Or is it 'underlying algorithm'?Īs mentioned by sandeep kurkarnii, JDK consists of compiler and JVM. The reason is, when we say 'JDK', what exactly do we mean? Is it 'executable' which converts. Tim Moores wrote:In some ways it is the same on all platforms, while in other ways it is different can you phrase the question more precisely?






Linux vs unix vs windows vs mac