A compiler takes the Java bytecode (which is machine-independent) and compiles it on demand into native code for the target machine, giving faster execution. Since JIT compilers operate on the client machine, they preserve the platform- independence of the compiled Java program.